azure_mgmt_compute 0.19.1 → 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (821) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-15/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  3. data/lib/2016-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  4. data/lib/2016-04-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  5. data/lib/2017-03-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  6. data/lib/2017-09-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  7. data/lib/2017-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  8. data/lib/2018-04-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  9. data/lib/2018-06-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  10. data/lib/2018-09-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  11. data/lib/2018-10-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  12. data/lib/2019-03-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  13. data/lib/2019-04-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  14. data/lib/2019-04-01/generated/azure_mgmt_compute/resource_skus.rb +8 -4
  15. data/lib/2019-07-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  16. data/lib/2019-11-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  17. data/lib/2019-12-01/generated/azure_mgmt_compute.rb +311 -0
  18. data/lib/2019-12-01/generated/azure_mgmt_compute/availability_sets.rb +920 -0
  19. data/lib/2019-12-01/generated/azure_mgmt_compute/compute_management_client.rb +232 -0
  20. data/lib/2019-12-01/generated/azure_mgmt_compute/dedicated_host_groups.rb +852 -0
  21. data/lib/2019-12-01/generated/azure_mgmt_compute/dedicated_hosts.rb +806 -0
  22. data/lib/2019-12-01/generated/azure_mgmt_compute/galleries.rb +988 -0
  23. data/lib/2019-12-01/generated/azure_mgmt_compute/gallery_application_versions.rb +915 -0
  24. data/lib/2019-12-01/generated/azure_mgmt_compute/gallery_applications.rb +856 -0
  25. data/lib/2019-12-01/generated/azure_mgmt_compute/gallery_image_versions.rb +911 -0
  26. data/lib/2019-12-01/generated/azure_mgmt_compute/gallery_images.rb +856 -0
  27. data/lib/2019-12-01/generated/azure_mgmt_compute/images.rb +975 -0
  28. data/lib/2019-12-01/generated/azure_mgmt_compute/log_analytics.rb +341 -0
  29. data/lib/2019-12-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  30. data/lib/2019-12-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb +93 -0
  31. data/lib/2019-12-01/generated/azure_mgmt_compute/models/aggregated_replication_state.rb +18 -0
  32. data/lib/2019-12-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +47 -0
  33. data/lib/2019-12-01/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  34. data/lib/2019-12-01/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  35. data/lib/2019-12-01/generated/azure_mgmt_compute/models/automatic_osupgrade_policy.rb +63 -0
  36. data/lib/2019-12-01/generated/azure_mgmt_compute/models/automatic_osupgrade_properties.rb +47 -0
  37. data/lib/2019-12-01/generated/azure_mgmt_compute/models/automatic_repairs_policy.rb +64 -0
  38. data/lib/2019-12-01/generated/azure_mgmt_compute/models/availability_set.rb +189 -0
  39. data/lib/2019-12-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb +100 -0
  40. data/lib/2019-12-01/generated/azure_mgmt_compute/models/availability_set_sku_types.rb +16 -0
  41. data/lib/2019-12-01/generated/azure_mgmt_compute/models/availability_set_update.rb +142 -0
  42. data/lib/2019-12-01/generated/azure_mgmt_compute/models/billing_profile.rb +60 -0
  43. data/lib/2019-12-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb +62 -0
  44. data/lib/2019-12-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +74 -0
  45. data/lib/2019-12-01/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
  46. data/lib/2019-12-01/generated/azure_mgmt_compute/models/component_names.rb +15 -0
  47. data/lib/2019-12-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  48. data/lib/2019-12-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  49. data/lib/2019-12-01/generated/azure_mgmt_compute/models/data_disk.rb +201 -0
  50. data/lib/2019-12-01/generated/azure_mgmt_compute/models/data_disk_image.rb +49 -0
  51. data/lib/2019-12-01/generated/azure_mgmt_compute/models/data_disk_image_encryption.rb +57 -0
  52. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host.rb +220 -0
  53. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_allocatable_vm.rb +60 -0
  54. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_available_capacity.rb +57 -0
  55. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_group.rb +148 -0
  56. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_group_list_result.rb +100 -0
  57. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_group_update.rb +111 -0
  58. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view.rb +81 -0
  59. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_license_types.rb +17 -0
  60. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_list_result.rb +100 -0
  61. data/lib/2019-12-01/generated/azure_mgmt_compute/models/dedicated_host_update.rb +172 -0
  62. data/lib/2019-12-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb +52 -0
  63. data/lib/2019-12-01/generated/azure_mgmt_compute/models/diff_disk_options.rb +15 -0
  64. data/lib/2019-12-01/generated/azure_mgmt_compute/models/diff_disk_placement.rb +16 -0
  65. data/lib/2019-12-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +69 -0
  66. data/lib/2019-12-01/generated/azure_mgmt_compute/models/disallowed.rb +54 -0
  67. data/lib/2019-12-01/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
  68. data/lib/2019-12-01/generated/azure_mgmt_compute/models/disk_encryption_set_parameters.rb +46 -0
  69. data/lib/2019-12-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +73 -0
  70. data/lib/2019-12-01/generated/azure_mgmt_compute/models/disk_image_encryption.rb +47 -0
  71. data/lib/2019-12-01/generated/azure_mgmt_compute/models/disk_instance_view.rb +87 -0
  72. data/lib/2019-12-01/generated/azure_mgmt_compute/models/encryption_images.rb +69 -0
  73. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery.rb +125 -0
  74. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application.rb +161 -0
  75. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_list.rb +100 -0
  76. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_update.rb +153 -0
  77. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_version.rb +127 -0
  78. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_version_list.rb +101 -0
  79. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb +130 -0
  80. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_version_update.rb +119 -0
  81. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +120 -0
  82. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_artifact_source.rb +47 -0
  83. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_artifact_version_source.rb +47 -0
  84. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb +76 -0
  85. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_disk_image.rb +74 -0
  86. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_identifier.rb +48 -0
  87. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image.rb +251 -0
  88. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_identifier.rb +68 -0
  89. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_list.rb +100 -0
  90. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_update.rb +243 -0
  91. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_version.rb +139 -0
  92. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_version_list.rb +100 -0
  93. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +93 -0
  94. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb +79 -0
  95. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_image_version_update.rb +131 -0
  96. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_list.rb +99 -0
  97. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb +62 -0
  98. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_update.rb +117 -0
  99. data/lib/2019-12-01/generated/azure_mgmt_compute/models/hardware_profile.rb +104 -0
  100. data/lib/2019-12-01/generated/azure_mgmt_compute/models/host_caching.rb +17 -0
  101. data/lib/2019-12-01/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  102. data/lib/2019-12-01/generated/azure_mgmt_compute/models/hyper_vgeneration_type.rb +16 -0
  103. data/lib/2019-12-01/generated/azure_mgmt_compute/models/hyper_vgeneration_types.rb +16 -0
  104. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image.rb +139 -0
  105. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_data_disk.rb +108 -0
  106. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_disk.rb +126 -0
  107. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_list_result.rb +99 -0
  108. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_osdisk.rb +123 -0
  109. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_purchase_plan.rb +69 -0
  110. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_reference.rb +114 -0
  111. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +86 -0
  112. data/lib/2019-12-01/generated/azure_mgmt_compute/models/image_update.rb +102 -0
  113. data/lib/2019-12-01/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  114. data/lib/2019-12-01/generated/azure_mgmt_compute/models/instance_view_status.rb +93 -0
  115. data/lib/2019-12-01/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  116. data/lib/2019-12-01/generated/azure_mgmt_compute/models/interval_in_mins.rb +18 -0
  117. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ipversion.rb +16 -0
  118. data/lib/2019-12-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +59 -0
  119. data/lib/2019-12-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +59 -0
  120. data/lib/2019-12-01/generated/azure_mgmt_compute/models/linux_configuration.rb +81 -0
  121. data/lib/2019-12-01/generated/azure_mgmt_compute/models/list_usages_result.rb +100 -0
  122. data/lib/2019-12-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +102 -0
  123. data/lib/2019-12-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb +48 -0
  124. data/lib/2019-12-01/generated/azure_mgmt_compute/models/log_analytics_output.rb +47 -0
  125. data/lib/2019-12-01/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +18 -0
  126. data/lib/2019-12-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +115 -0
  127. data/lib/2019-12-01/generated/azure_mgmt_compute/models/managed_artifact.rb +46 -0
  128. data/lib/2019-12-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +70 -0
  129. data/lib/2019-12-01/generated/azure_mgmt_compute/models/network_interface_reference.rb +55 -0
  130. data/lib/2019-12-01/generated/azure_mgmt_compute/models/network_profile.rb +57 -0
  131. data/lib/2019-12-01/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  132. data/lib/2019-12-01/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  133. data/lib/2019-12-01/generated/azure_mgmt_compute/models/orchestration_service_names.rb +16 -0
  134. data/lib/2019-12-01/generated/azure_mgmt_compute/models/orchestration_service_state.rb +17 -0
  135. data/lib/2019-12-01/generated/azure_mgmt_compute/models/orchestration_service_state_action.rb +16 -0
  136. data/lib/2019-12-01/generated/azure_mgmt_compute/models/orchestration_service_state_input.rb +59 -0
  137. data/lib/2019-12-01/generated/azure_mgmt_compute/models/orchestration_service_summary.rb +61 -0
  138. data/lib/2019-12-01/generated/azure_mgmt_compute/models/osdisk.rb +191 -0
  139. data/lib/2019-12-01/generated/azure_mgmt_compute/models/osdisk_image.rb +48 -0
  140. data/lib/2019-12-01/generated/azure_mgmt_compute/models/osdisk_image_encryption.rb +43 -0
  141. data/lib/2019-12-01/generated/azure_mgmt_compute/models/osprofile.rb +202 -0
  142. data/lib/2019-12-01/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
  143. data/lib/2019-12-01/generated/azure_mgmt_compute/models/plan.rb +86 -0
  144. data/lib/2019-12-01/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
  145. data/lib/2019-12-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +180 -0
  146. data/lib/2019-12-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  147. data/lib/2019-12-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  148. data/lib/2019-12-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  149. data/lib/2019-12-01/generated/azure_mgmt_compute/models/purchase_plan.rb +71 -0
  150. data/lib/2019-12-01/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb +60 -0
  151. data/lib/2019-12-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb +60 -0
  152. data/lib/2019-12-01/generated/azure_mgmt_compute/models/regional_replication_status.rb +86 -0
  153. data/lib/2019-12-01/generated/azure_mgmt_compute/models/replication_state.rb +18 -0
  154. data/lib/2019-12-01/generated/azure_mgmt_compute/models/replication_status.rb +71 -0
  155. data/lib/2019-12-01/generated/azure_mgmt_compute/models/replication_status_types.rb +15 -0
  156. data/lib/2019-12-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +97 -0
  157. data/lib/2019-12-01/generated/azure_mgmt_compute/models/resource.rb +110 -0
  158. data/lib/2019-12-01/generated/azure_mgmt_compute/models/resource_identity_type.rb +18 -0
  159. data/lib/2019-12-01/generated/azure_mgmt_compute/models/resource_range.rb +57 -0
  160. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rollback_status_info.rb +74 -0
  161. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +16 -0
  162. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb +108 -0
  163. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +88 -0
  164. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +88 -0
  165. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +18 -0
  166. data/lib/2019-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +141 -0
  167. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_document.rb +116 -0
  168. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_document_base.rb +92 -0
  169. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_input.rb +87 -0
  170. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +57 -0
  171. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_list_result.rb +100 -0
  172. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +81 -0
  173. data/lib/2019-12-01/generated/azure_mgmt_compute/models/run_command_result.rb +56 -0
  174. data/lib/2019-12-01/generated/azure_mgmt_compute/models/scale_in_policy.rb +71 -0
  175. data/lib/2019-12-01/generated/azure_mgmt_compute/models/scheduled_events_profile.rb +49 -0
  176. data/lib/2019-12-01/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
  177. data/lib/2019-12-01/generated/azure_mgmt_compute/models/sku.rb +73 -0
  178. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ssh_configuration.rb +56 -0
  179. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +64 -0
  180. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ssh_public_key_generate_key_pair_result.rb +73 -0
  181. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ssh_public_key_resource.rb +102 -0
  182. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ssh_public_key_update_resource.rb +67 -0
  183. data/lib/2019-12-01/generated/azure_mgmt_compute/models/ssh_public_keys_group_list_result.rb +100 -0
  184. data/lib/2019-12-01/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  185. data/lib/2019-12-01/generated/azure_mgmt_compute/models/storage_account_type.rb +17 -0
  186. data/lib/2019-12-01/generated/azure_mgmt_compute/models/storage_account_types.rb +18 -0
  187. data/lib/2019-12-01/generated/azure_mgmt_compute/models/storage_profile.rb +89 -0
  188. data/lib/2019-12-01/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  189. data/lib/2019-12-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +48 -0
  190. data/lib/2019-12-01/generated/azure_mgmt_compute/models/sub_resource_with_colocation_status.rb +57 -0
  191. data/lib/2019-12-01/generated/azure_mgmt_compute/models/target_region.rb +83 -0
  192. data/lib/2019-12-01/generated/azure_mgmt_compute/models/terminate_notification_profile.rb +62 -0
  193. data/lib/2019-12-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +83 -0
  194. data/lib/2019-12-01/generated/azure_mgmt_compute/models/update_resource.rb +54 -0
  195. data/lib/2019-12-01/generated/azure_mgmt_compute/models/update_resource_definition.rb +90 -0
  196. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_mode.rb +17 -0
  197. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb +73 -0
  198. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +116 -0
  199. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb +74 -0
  200. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_operation_invoker.rb +17 -0
  201. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_policy.rb +79 -0
  202. data/lib/2019-12-01/generated/azure_mgmt_compute/models/upgrade_state.rb +18 -0
  203. data/lib/2019-12-01/generated/azure_mgmt_compute/models/usage.rb +83 -0
  204. data/lib/2019-12-01/generated/azure_mgmt_compute/models/usage_name.rb +57 -0
  205. data/lib/2019-12-01/generated/azure_mgmt_compute/models/user_artifact_manage.rb +74 -0
  206. data/lib/2019-12-01/generated/azure_mgmt_compute/models/user_artifact_source.rb +59 -0
  207. data/lib/2019-12-01/generated/azure_mgmt_compute/models/vault_certificate.rb +72 -0
  208. data/lib/2019-12-01/generated/azure_mgmt_compute/models/vault_secret_group.rb +69 -0
  209. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +46 -0
  210. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine.rb +412 -0
  211. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +87 -0
  212. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +69 -0
  213. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +99 -0
  214. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_eviction_policy_types.rb +16 -0
  215. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +195 -0
  216. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +71 -0
  217. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +146 -0
  218. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +109 -0
  219. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_update.rb +134 -0
  220. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb +55 -0
  221. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb +48 -0
  222. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +102 -0
  223. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb +61 -0
  224. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_image.rb +142 -0
  225. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +87 -0
  226. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +217 -0
  227. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +99 -0
  228. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_priority_types.rb +17 -0
  229. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +49 -0
  230. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +318 -0
  231. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +153 -0
  232. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +184 -0
  233. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +103 -0
  234. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +56 -0
  235. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_update.rb +185 -0
  236. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +105 -0
  237. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb +61 -0
  238. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +113 -0
  239. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +59 -0
  240. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb +58 -0
  241. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +195 -0
  242. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb +104 -0
  243. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +100 -0
  244. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +101 -0
  245. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +102 -0
  246. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +63 -0
  247. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +137 -0
  248. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +56 -0
  249. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +71 -0
  250. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +180 -0
  251. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +167 -0
  252. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +120 -0
  253. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +51 -0
  254. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  255. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_scale_in_rules.rb +17 -0
  256. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +74 -0
  257. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +85 -0
  258. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  259. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +91 -0
  260. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +210 -0
  261. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +190 -0
  262. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +136 -0
  263. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +72 -0
  264. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +122 -0
  265. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +92 -0
  266. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +72 -0
  267. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +80 -0
  268. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +138 -0
  269. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +384 -0
  270. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +70 -0
  271. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  272. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +55 -0
  273. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +196 -0
  274. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +101 -0
  275. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmnetwork_profile_configuration.rb +57 -0
  276. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +176 -0
  277. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprotection_policy.rb +60 -0
  278. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  279. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb +106 -0
  280. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +55 -0
  281. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +180 -0
  282. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +61 -0
  283. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +355 -0
  284. data/lib/2019-12-01/generated/azure_mgmt_compute/models/vmscale_set_convert_to_single_placement_group_input.rb +52 -0
  285. data/lib/2019-12-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +56 -0
  286. data/lib/2019-12-01/generated/azure_mgmt_compute/models/win_rmlistener.rb +67 -0
  287. data/lib/2019-12-01/generated/azure_mgmt_compute/models/windows_configuration.rb +114 -0
  288. data/lib/2019-12-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  289. data/lib/2019-12-01/generated/azure_mgmt_compute/operations.rb +109 -0
  290. data/lib/2019-12-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +846 -0
  291. data/lib/2019-12-01/generated/azure_mgmt_compute/ssh_public_keys.rb +939 -0
  292. data/lib/2019-12-01/generated/azure_mgmt_compute/usage_operations.rb +241 -0
  293. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +360 -0
  294. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb +701 -0
  295. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_images.rb +600 -0
  296. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +322 -0
  297. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +821 -0
  298. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +498 -0
  299. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmextensions.rb +709 -0
  300. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +2115 -0
  301. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +3290 -0
  302. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +122 -0
  303. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machines.rb +3078 -0
  304. data/lib/2020-06-01/generated/azure_mgmt_compute.rb +286 -0
  305. data/lib/2020-06-01/generated/azure_mgmt_compute/availability_sets.rb +920 -0
  306. data/lib/2020-06-01/generated/azure_mgmt_compute/compute_management_client.rb +217 -0
  307. data/lib/2020-06-01/generated/azure_mgmt_compute/dedicated_host_groups.rb +861 -0
  308. data/lib/2020-06-01/generated/azure_mgmt_compute/dedicated_hosts.rb +806 -0
  309. data/lib/2020-06-01/generated/azure_mgmt_compute/images.rb +975 -0
  310. data/lib/2020-06-01/generated/azure_mgmt_compute/log_analytics.rb +341 -0
  311. data/lib/2020-06-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  312. data/lib/2020-06-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb +93 -0
  313. data/lib/2020-06-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +47 -0
  314. data/lib/2020-06-01/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  315. data/lib/2020-06-01/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  316. data/lib/2020-06-01/generated/azure_mgmt_compute/models/automatic_osupgrade_policy.rb +63 -0
  317. data/lib/2020-06-01/generated/azure_mgmt_compute/models/automatic_osupgrade_properties.rb +47 -0
  318. data/lib/2020-06-01/generated/azure_mgmt_compute/models/automatic_repairs_policy.rb +64 -0
  319. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set.rb +189 -0
  320. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb +100 -0
  321. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set_sku_types.rb +16 -0
  322. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set_update.rb +142 -0
  323. data/lib/2020-06-01/generated/azure_mgmt_compute/models/available_patch_summary.rb +143 -0
  324. data/lib/2020-06-01/generated/azure_mgmt_compute/models/billing_profile.rb +60 -0
  325. data/lib/2020-06-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb +63 -0
  326. data/lib/2020-06-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +78 -0
  327. data/lib/2020-06-01/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
  328. data/lib/2020-06-01/generated/azure_mgmt_compute/models/component_names.rb +15 -0
  329. data/lib/2020-06-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  330. data/lib/2020-06-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  331. data/lib/2020-06-01/generated/azure_mgmt_compute/models/data_disk.rb +201 -0
  332. data/lib/2020-06-01/generated/azure_mgmt_compute/models/data_disk_image.rb +49 -0
  333. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host.rb +219 -0
  334. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_allocatable_vm.rb +60 -0
  335. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_available_capacity.rb +57 -0
  336. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group.rb +178 -0
  337. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_instance_view.rb +57 -0
  338. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_list_result.rb +100 -0
  339. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_update.rb +141 -0
  340. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view.rb +81 -0
  341. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view_with_name.rb +84 -0
  342. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_license_types.rb +17 -0
  343. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_list_result.rb +100 -0
  344. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_update.rb +171 -0
  345. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb +52 -0
  346. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diff_disk_options.rb +15 -0
  347. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diff_disk_placement.rb +16 -0
  348. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +69 -0
  349. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disallowed_configuration.rb +47 -0
  350. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
  351. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_encryption_set_parameters.rb +46 -0
  352. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +73 -0
  353. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_instance_view.rb +87 -0
  354. data/lib/2020-06-01/generated/azure_mgmt_compute/models/execution_state.rb +21 -0
  355. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hardware_profile.rb +109 -0
  356. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hyper_vgeneration_type.rb +16 -0
  357. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hyper_vgeneration_types.rb +16 -0
  358. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image.rb +139 -0
  359. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_data_disk.rb +108 -0
  360. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_disk.rb +126 -0
  361. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_list_result.rb +99 -0
  362. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_osdisk.rb +123 -0
  363. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_reference.rb +114 -0
  364. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +86 -0
  365. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_update.rb +102 -0
  366. data/lib/2020-06-01/generated/azure_mgmt_compute/models/in_guest_patch_mode.rb +17 -0
  367. data/lib/2020-06-01/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  368. data/lib/2020-06-01/generated/azure_mgmt_compute/models/instance_view_status.rb +93 -0
  369. data/lib/2020-06-01/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  370. data/lib/2020-06-01/generated/azure_mgmt_compute/models/interval_in_mins.rb +18 -0
  371. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ipversion.rb +16 -0
  372. data/lib/2020-06-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +59 -0
  373. data/lib/2020-06-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +59 -0
  374. data/lib/2020-06-01/generated/azure_mgmt_compute/models/last_patch_installation_summary.rb +211 -0
  375. data/lib/2020-06-01/generated/azure_mgmt_compute/models/linux_configuration.rb +81 -0
  376. data/lib/2020-06-01/generated/azure_mgmt_compute/models/list_usages_result.rb +100 -0
  377. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +124 -0
  378. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb +48 -0
  379. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_output.rb +47 -0
  380. data/lib/2020-06-01/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +18 -0
  381. data/lib/2020-06-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +115 -0
  382. data/lib/2020-06-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +70 -0
  383. data/lib/2020-06-01/generated/azure_mgmt_compute/models/network_interface_reference.rb +55 -0
  384. data/lib/2020-06-01/generated/azure_mgmt_compute/models/network_profile.rb +57 -0
  385. data/lib/2020-06-01/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  386. data/lib/2020-06-01/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  387. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_names.rb +16 -0
  388. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_state.rb +17 -0
  389. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_state_action.rb +16 -0
  390. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_state_input.rb +59 -0
  391. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_summary.rb +61 -0
  392. data/lib/2020-06-01/generated/azure_mgmt_compute/models/osdisk.rb +191 -0
  393. data/lib/2020-06-01/generated/azure_mgmt_compute/models/osdisk_image.rb +48 -0
  394. data/lib/2020-06-01/generated/azure_mgmt_compute/models/osprofile.rb +204 -0
  395. data/lib/2020-06-01/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
  396. data/lib/2020-06-01/generated/azure_mgmt_compute/models/patch_assessment_state.rb +20 -0
  397. data/lib/2020-06-01/generated/azure_mgmt_compute/models/patch_operation_status.rb +18 -0
  398. data/lib/2020-06-01/generated/azure_mgmt_compute/models/patch_settings.rb +59 -0
  399. data/lib/2020-06-01/generated/azure_mgmt_compute/models/plan.rb +86 -0
  400. data/lib/2020-06-01/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
  401. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +180 -0
  402. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  403. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  404. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  405. data/lib/2020-06-01/generated/azure_mgmt_compute/models/purchase_plan.rb +71 -0
  406. data/lib/2020-06-01/generated/azure_mgmt_compute/models/reboot_status.rb +19 -0
  407. data/lib/2020-06-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb +60 -0
  408. data/lib/2020-06-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +113 -0
  409. data/lib/2020-06-01/generated/azure_mgmt_compute/models/resource.rb +110 -0
  410. data/lib/2020-06-01/generated/azure_mgmt_compute/models/resource_identity_type.rb +18 -0
  411. data/lib/2020-06-01/generated/azure_mgmt_compute/models/retrieve_boot_diagnostics_data_result.rb +59 -0
  412. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rollback_status_info.rb +74 -0
  413. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +16 -0
  414. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb +108 -0
  415. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +88 -0
  416. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +88 -0
  417. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +18 -0
  418. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +141 -0
  419. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_document.rb +116 -0
  420. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_document_base.rb +92 -0
  421. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_input.rb +87 -0
  422. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +57 -0
  423. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_list_result.rb +100 -0
  424. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +81 -0
  425. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_result.rb +56 -0
  426. data/lib/2020-06-01/generated/azure_mgmt_compute/models/scale_in_policy.rb +71 -0
  427. data/lib/2020-06-01/generated/azure_mgmt_compute/models/scheduled_events_profile.rb +49 -0
  428. data/lib/2020-06-01/generated/azure_mgmt_compute/models/security_profile.rb +52 -0
  429. data/lib/2020-06-01/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
  430. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sku.rb +73 -0
  431. data/lib/2020-06-01/generated/azure_mgmt_compute/models/software_update_reboot_behavior.rb +17 -0
  432. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_configuration.rb +56 -0
  433. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +64 -0
  434. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key_generate_key_pair_result.rb +73 -0
  435. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key_resource.rb +102 -0
  436. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key_update_resource.rb +67 -0
  437. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_keys_group_list_result.rb +100 -0
  438. data/lib/2020-06-01/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  439. data/lib/2020-06-01/generated/azure_mgmt_compute/models/storage_account_types.rb +18 -0
  440. data/lib/2020-06-01/generated/azure_mgmt_compute/models/storage_profile.rb +89 -0
  441. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  442. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +48 -0
  443. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sub_resource_with_colocation_status.rb +57 -0
  444. data/lib/2020-06-01/generated/azure_mgmt_compute/models/terminate_notification_profile.rb +62 -0
  445. data/lib/2020-06-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +99 -0
  446. data/lib/2020-06-01/generated/azure_mgmt_compute/models/update_resource.rb +54 -0
  447. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_mode.rb +17 -0
  448. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb +73 -0
  449. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +116 -0
  450. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb +74 -0
  451. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_invoker.rb +17 -0
  452. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_policy.rb +79 -0
  453. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_state.rb +18 -0
  454. data/lib/2020-06-01/generated/azure_mgmt_compute/models/usage.rb +83 -0
  455. data/lib/2020-06-01/generated/azure_mgmt_compute/models/usage_name.rb +57 -0
  456. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vault_certificate.rb +72 -0
  457. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vault_secret_group.rb +69 -0
  458. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +46 -0
  459. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine.rb +455 -0
  460. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +87 -0
  461. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_assess_patches_result.rb +152 -0
  462. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +69 -0
  463. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +99 -0
  464. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_eviction_policy_types.rb +16 -0
  465. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +208 -0
  466. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +71 -0
  467. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +146 -0
  468. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +109 -0
  469. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_update.rb +147 -0
  470. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb +55 -0
  471. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb +48 -0
  472. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +102 -0
  473. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb +61 -0
  474. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_image.rb +155 -0
  475. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +87 -0
  476. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +258 -0
  477. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +99 -0
  478. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_patch_status.rb +61 -0
  479. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_priority_types.rb +17 -0
  480. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +49 -0
  481. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command.rb +241 -0
  482. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_instance_view.rb +135 -0
  483. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_script_source.rb +68 -0
  484. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_update.rb +206 -0
  485. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_commands_list_result.rb +98 -0
  486. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +332 -0
  487. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +153 -0
  488. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +197 -0
  489. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +103 -0
  490. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +70 -0
  491. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_update.rb +198 -0
  492. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +105 -0
  493. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb +61 -0
  494. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +113 -0
  495. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +59 -0
  496. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb +58 -0
  497. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +195 -0
  498. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb +104 -0
  499. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +100 -0
  500. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +101 -0
  501. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +102 -0
  502. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +63 -0
  503. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +149 -0
  504. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +56 -0
  505. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +71 -0
  506. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +180 -0
  507. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +167 -0
  508. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +120 -0
  509. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +51 -0
  510. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  511. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_scale_in_rules.rb +17 -0
  512. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +74 -0
  513. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +85 -0
  514. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  515. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +91 -0
  516. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +210 -0
  517. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +190 -0
  518. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +148 -0
  519. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +72 -0
  520. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +122 -0
  521. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +92 -0
  522. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +72 -0
  523. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +80 -0
  524. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +151 -0
  525. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +398 -0
  526. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension.rb +190 -0
  527. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension_update.rb +164 -0
  528. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_list_result.rb +57 -0
  529. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +70 -0
  530. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  531. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +55 -0
  532. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +211 -0
  533. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +101 -0
  534. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmnetwork_profile_configuration.rb +57 -0
  535. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +190 -0
  536. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprotection_policy.rb +60 -0
  537. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  538. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb +106 -0
  539. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +55 -0
  540. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +180 -0
  541. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_software_patch_properties.rb +173 -0
  542. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +61 -0
  543. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +398 -0
  544. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vm_disk_types.rb +16 -0
  545. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vmscale_set_convert_to_single_placement_group_input.rb +52 -0
  546. data/lib/2020-06-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +56 -0
  547. data/lib/2020-06-01/generated/azure_mgmt_compute/models/win_rmlistener.rb +67 -0
  548. data/lib/2020-06-01/generated/azure_mgmt_compute/models/windows_configuration.rb +127 -0
  549. data/lib/2020-06-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  550. data/lib/2020-06-01/generated/azure_mgmt_compute/operations.rb +109 -0
  551. data/lib/2020-06-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +846 -0
  552. data/lib/2020-06-01/generated/azure_mgmt_compute/ssh_public_keys.rb +939 -0
  553. data/lib/2020-06-01/generated/azure_mgmt_compute/usage_operations.rb +241 -0
  554. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +360 -0
  555. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb +701 -0
  556. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_images.rb +600 -0
  557. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +1112 -0
  558. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +821 -0
  559. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +498 -0
  560. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmextensions.rb +709 -0
  561. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmrun_commands.rb +827 -0
  562. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +2220 -0
  563. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +3290 -0
  564. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +122 -0
  565. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machines.rb +3302 -0
  566. data/lib/2020-06-30/generated/azure_mgmt_compute.rb +80 -0
  567. data/lib/2020-06-30/generated/azure_mgmt_compute/compute_management_client.rb +145 -0
  568. data/lib/2020-06-30/generated/azure_mgmt_compute/disk_accesses.rb +1120 -0
  569. data/lib/2020-06-30/generated/azure_mgmt_compute/disk_encryption_sets.rb +1236 -0
  570. data/lib/2020-06-30/generated/azure_mgmt_compute/disks.rb +1294 -0
  571. data/lib/2020-06-30/generated/azure_mgmt_compute/models/access_level.rb +17 -0
  572. data/lib/2020-06-30/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
  573. data/lib/2020-06-30/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  574. data/lib/2020-06-30/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  575. data/lib/2020-06-30/generated/azure_mgmt_compute/models/creation_data.rb +150 -0
  576. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk.rb +422 -0
  577. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_access.rb +133 -0
  578. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_access_list.rb +100 -0
  579. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_access_update.rb +54 -0
  580. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_create_option.rb +21 -0
  581. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set.rb +160 -0
  582. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_identity_type.rb +15 -0
  583. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_list.rb +100 -0
  584. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_type.rb +16 -0
  585. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_update.rb +79 -0
  586. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
  587. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_sku.rb +61 -0
  588. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_state.rb +20 -0
  589. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
  590. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_update.rb +225 -0
  591. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption.rb +60 -0
  592. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_set_identity.rb +78 -0
  593. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb +85 -0
  594. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb +62 -0
  595. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_type.rb +17 -0
  596. data/lib/2020-06-30/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
  597. data/lib/2020-06-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  598. data/lib/2020-06-30/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
  599. data/lib/2020-06-30/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  600. data/lib/2020-06-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
  601. data/lib/2020-06-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
  602. data/lib/2020-06-30/generated/azure_mgmt_compute/models/network_access_policy.rb +17 -0
  603. data/lib/2020-06-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  604. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint.rb +47 -0
  605. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_connection.rb +110 -0
  606. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_connection_provisioning_state.rb +18 -0
  607. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_service_connection_status.rb +17 -0
  608. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_link_resource.rb +123 -0
  609. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_link_resource_list_result.rb +55 -0
  610. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_link_service_connection_state.rb +72 -0
  611. data/lib/2020-06-30/generated/azure_mgmt_compute/models/resource.rb +110 -0
  612. data/lib/2020-06-30/generated/azure_mgmt_compute/models/resource_uri_list.rb +100 -0
  613. data/lib/2020-06-30/generated/azure_mgmt_compute/models/share_info_element.rb +49 -0
  614. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot.rb +290 -0
  615. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
  616. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_sku.rb +60 -0
  617. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
  618. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_update.rb +145 -0
  619. data/lib/2020-06-30/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
  620. data/lib/2020-06-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
  621. data/lib/2020-06-30/generated/azure_mgmt_compute/snapshots.rb +1294 -0
  622. data/lib/2020-09-30-preview/generated/azure_mgmt_compute.rb +106 -0
  623. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +165 -0
  624. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/galleries.rb +994 -0
  625. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_application_versions.rb +915 -0
  626. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_applications.rb +856 -0
  627. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_image_versions.rb +911 -0
  628. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_images.rb +856 -0
  629. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_sharing_profile.rb +189 -0
  630. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/aggregated_replication_state.rb +18 -0
  631. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  632. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  633. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/data_disk_image_encryption.rb +57 -0
  634. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/disallowed.rb +54 -0
  635. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/disk_image_encryption.rb +47 -0
  636. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/encryption_images.rb +69 -0
  637. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery.rb +137 -0
  638. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application.rb +161 -0
  639. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_list.rb +100 -0
  640. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_update.rb +153 -0
  641. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version.rb +127 -0
  642. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_list.rb +101 -0
  643. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb +130 -0
  644. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_update.rb +119 -0
  645. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +120 -0
  646. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_source.rb +47 -0
  647. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_version_source.rb +60 -0
  648. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb +76 -0
  649. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_disk_image.rb +74 -0
  650. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_identifier.rb +48 -0
  651. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image.rb +271 -0
  652. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_feature.rb +57 -0
  653. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_identifier.rb +68 -0
  654. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_list.rb +100 -0
  655. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_update.rb +263 -0
  656. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version.rb +139 -0
  657. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_list.rb +100 -0
  658. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +93 -0
  659. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb +79 -0
  660. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_update.rb +131 -0
  661. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_list.rb +99 -0
  662. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb +62 -0
  663. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_sharing_permission_types.rb +16 -0
  664. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_update.rb +129 -0
  665. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/host_caching.rb +17 -0
  666. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  667. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/image_purchase_plan.rb +69 -0
  668. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  669. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/managed_artifact.rb +46 -0
  670. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  671. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  672. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/osdisk_image_encryption.rb +43 -0
  673. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/pir_resource.rb +59 -0
  674. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/pir_shared_gallery_resource.rb +64 -0
  675. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb +60 -0
  676. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/regional_replication_status.rb +86 -0
  677. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_state.rb +18 -0
  678. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status.rb +71 -0
  679. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status_types.rb +15 -0
  680. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/resource.rb +110 -0
  681. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/resource_range.rb +57 -0
  682. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/select_permissions.rb +15 -0
  683. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery.rb +62 -0
  684. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image.rb +186 -0
  685. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_list.rb +100 -0
  686. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version.rb +88 -0
  687. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version_list.rb +101 -0
  688. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_list.rb +99 -0
  689. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_to_values.rb +15 -0
  690. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile.rb +70 -0
  691. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group.rb +69 -0
  692. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group_types.rb +16 -0
  693. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update.rb +69 -0
  694. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update_operation_types.rb +17 -0
  695. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/storage_account_type.rb +17 -0
  696. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/target_region.rb +83 -0
  697. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/update_resource_definition.rb +90 -0
  698. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_manage.rb +74 -0
  699. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_source.rb +59 -0
  700. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
  701. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_galleries.rb +332 -0
  702. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_image_versions.rb +366 -0
  703. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_images.rb +344 -0
  704. data/lib/2020-09-30/generated/azure_mgmt_compute.rb +89 -0
  705. data/lib/2020-09-30/generated/azure_mgmt_compute/compute_management_client.rb +149 -0
  706. data/lib/2020-09-30/generated/azure_mgmt_compute/disk_accesses.rb +1804 -0
  707. data/lib/2020-09-30/generated/azure_mgmt_compute/disk_encryption_sets.rb +1236 -0
  708. data/lib/2020-09-30/generated/azure_mgmt_compute/disk_restore_point_operations.rb +372 -0
  709. data/lib/2020-09-30/generated/azure_mgmt_compute/disks.rb +1294 -0
  710. data/lib/2020-09-30/generated/azure_mgmt_compute/models/access_level.rb +17 -0
  711. data/lib/2020-09-30/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
  712. data/lib/2020-09-30/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  713. data/lib/2020-09-30/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  714. data/lib/2020-09-30/generated/azure_mgmt_compute/models/creation_data.rb +150 -0
  715. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk.rb +462 -0
  716. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access.rb +133 -0
  717. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access_list.rb +100 -0
  718. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access_update.rb +54 -0
  719. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_create_option.rb +21 -0
  720. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set.rb +160 -0
  721. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_identity_type.rb +16 -0
  722. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_list.rb +100 -0
  723. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_type.rb +16 -0
  724. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_update.rb +79 -0
  725. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
  726. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_restore_point.rb +164 -0
  727. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_restore_point_list.rb +100 -0
  728. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_sku.rb +61 -0
  729. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_state.rb +20 -0
  730. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
  731. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_update.rb +251 -0
  732. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption.rb +60 -0
  733. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_set_identity.rb +81 -0
  734. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb +85 -0
  735. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb +62 -0
  736. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_type.rb +17 -0
  737. data/lib/2020-09-30/generated/azure_mgmt_compute/models/extended_location.rb +58 -0
  738. data/lib/2020-09-30/generated/azure_mgmt_compute/models/extended_location_types.rb +15 -0
  739. data/lib/2020-09-30/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
  740. data/lib/2020-09-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  741. data/lib/2020-09-30/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
  742. data/lib/2020-09-30/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  743. data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_for_disk_encryption_set.rb +61 -0
  744. data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
  745. data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
  746. data/lib/2020-09-30/generated/azure_mgmt_compute/models/network_access_policy.rb +17 -0
  747. data/lib/2020-09-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  748. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint.rb +47 -0
  749. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection.rb +110 -0
  750. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection_list_result.rb +100 -0
  751. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection_provisioning_state.rb +18 -0
  752. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_service_connection_status.rb +17 -0
  753. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_resource.rb +123 -0
  754. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_resource_list_result.rb +55 -0
  755. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_service_connection_state.rb +72 -0
  756. data/lib/2020-09-30/generated/azure_mgmt_compute/models/proxy_only_resource.rb +71 -0
  757. data/lib/2020-09-30/generated/azure_mgmt_compute/models/purchase_plan.rb +82 -0
  758. data/lib/2020-09-30/generated/azure_mgmt_compute/models/resource.rb +110 -0
  759. data/lib/2020-09-30/generated/azure_mgmt_compute/models/resource_uri_list.rb +100 -0
  760. data/lib/2020-09-30/generated/azure_mgmt_compute/models/share_info_element.rb +49 -0
  761. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot.rb +316 -0
  762. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
  763. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_sku.rb +62 -0
  764. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
  765. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_update.rb +145 -0
  766. data/lib/2020-09-30/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
  767. data/lib/2020-09-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
  768. data/lib/2020-09-30/generated/azure_mgmt_compute/snapshots.rb +1294 -0
  769. data/lib/2020-10-01-preview/generated/azure_mgmt_compute.rb +73 -0
  770. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb +1091 -0
  771. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_roles.rb +343 -0
  772. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_services.rb +1870 -0
  773. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_services_update_domain.rb +486 -0
  774. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/compute_management_client.rb +145 -0
  775. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  776. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  777. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service.rb +113 -0
  778. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_profile.rb +55 -0
  779. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_properties.rb +180 -0
  780. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_instance_view.rb +81 -0
  781. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_list_result.rb +98 -0
  782. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_network_profile.rb +68 -0
  783. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_os_profile.rb +56 -0
  784. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_properties.rb +176 -0
  785. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role.rb +107 -0
  786. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_list_result.rb +98 -0
  787. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile.rb +56 -0
  788. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile_properties.rb +58 -0
  789. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_properties.rb +49 -0
  790. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_sku.rb +72 -0
  791. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_update.rb +55 -0
  792. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_upgrade_mode.rb +17 -0
  793. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_and_secret_reference.rb +59 -0
  794. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_certificate.rb +48 -0
  795. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_secret_group.rb +69 -0
  796. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/extension.rb +58 -0
  797. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  798. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_sku.rb +60 -0
  799. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_statuses_summary.rb +56 -0
  800. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  801. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration.rb +58 -0
  802. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration_properties.rb +56 -0
  803. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration.rb +59 -0
  804. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration_properties.rb +72 -0
  805. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/resource_instance_view_status.rb +97 -0
  806. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance.rb +128 -0
  807. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_instance_view.rb +95 -0
  808. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_list_result.rb +98 -0
  809. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_network_profile.rb +57 -0
  810. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_properties.rb +60 -0
  811. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instances.rb +55 -0
  812. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/status_code_count.rb +60 -0
  813. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  814. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  815. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain.rb +59 -0
  816. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain_list_result.rb +98 -0
  817. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
  818. data/lib/azure_mgmt_compute.rb +16 -10
  819. data/lib/profiles/latest/modules/compute_profile_module.rb +1244 -786
  820. data/lib/version.rb +1 -1
  821. metadata +806 -5
@@ -0,0 +1,122 @@
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::V2019_12_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class VirtualMachineSizes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachineSizes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # This API is deprecated. Use [Resources
26
+ # Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
27
+ #
28
+ # @param location [String] The location upon which virtual-machine-sizes is
29
+ # queried.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [VirtualMachineSizeListResult] operation results.
34
+ #
35
+ def list(location, custom_headers:nil)
36
+ response = list_async(location, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # This API is deprecated. Use [Resources
42
+ # Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
43
+ #
44
+ # @param location [String] The location upon which virtual-machine-sizes is
45
+ # queried.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_with_http_info(location, custom_headers:nil)
52
+ list_async(location, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # This API is deprecated. Use [Resources
57
+ # Skus](https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
58
+ #
59
+ # @param location [String] The location upon which virtual-machine-sizes is
60
+ # queried.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(location, custom_headers:nil)
67
+ fail ArgumentError, 'location is nil' if location.nil?
68
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
69
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes'
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ options = {
84
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
85
+ path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
86
+ query_params: {'api-version' => @client.api_version},
87
+ headers: request_headers.merge(custom_headers || {}),
88
+ base_url: request_url
89
+ }
90
+ promise = @client.make_request_async(:get, path_template, options)
91
+
92
+ promise = promise.then do |result|
93
+ http_response = result.response
94
+ status_code = http_response.status
95
+ response_content = http_response.body
96
+ unless status_code == 200
97
+ error_model = JSON.load(response_content)
98
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
99
+ end
100
+
101
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
102
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
103
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
104
+ # Deserialize Response
105
+ if status_code == 200
106
+ begin
107
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
108
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineSizeListResult.mapper()
109
+ result.body = @client.deserialize(result_mapper, parsed_response)
110
+ rescue Exception => e
111
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
112
+ end
113
+ end
114
+
115
+ result
116
+ end
117
+
118
+ promise.execute
119
+ end
120
+
121
+ end
122
+ end
@@ -0,0 +1,3078 @@
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::V2019_12_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class VirtualMachines
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachines class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets all the virtual machines under the specified subscription for the
26
+ # specified location.
27
+ #
28
+ # @param location [String] The location for which virtual machines under the
29
+ # subscription are queried.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<VirtualMachine>] operation results.
34
+ #
35
+ def list_by_location(location, custom_headers:nil)
36
+ first_page = list_by_location_as_lazy(location, custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Gets all the virtual machines under the specified subscription for the
42
+ # specified location.
43
+ #
44
+ # @param location [String] The location for which virtual machines under the
45
+ # subscription are queried.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_by_location_with_http_info(location, custom_headers:nil)
52
+ list_by_location_async(location, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Gets all the virtual machines under the specified subscription for the
57
+ # specified location.
58
+ #
59
+ # @param location [String] The location for which virtual machines under the
60
+ # subscription are queried.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_by_location_async(location, custom_headers:nil)
67
+ fail ArgumentError, 'location is nil' if location.nil?
68
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
69
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+
72
+
73
+ request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines'
80
+
81
+ request_url = @base_url || @client.base_url
82
+
83
+ options = {
84
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
85
+ path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
86
+ query_params: {'api-version' => @client.api_version},
87
+ headers: request_headers.merge(custom_headers || {}),
88
+ base_url: request_url
89
+ }
90
+ promise = @client.make_request_async(:get, path_template, options)
91
+
92
+ promise = promise.then do |result|
93
+ http_response = result.response
94
+ status_code = http_response.status
95
+ response_content = http_response.body
96
+ unless status_code == 200
97
+ error_model = JSON.load(response_content)
98
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
99
+ end
100
+
101
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
102
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
103
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
104
+ # Deserialize Response
105
+ if status_code == 200
106
+ begin
107
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
108
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineListResult.mapper()
109
+ result.body = @client.deserialize(result_mapper, parsed_response)
110
+ rescue Exception => e
111
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
112
+ end
113
+ end
114
+
115
+ result
116
+ end
117
+
118
+ promise.execute
119
+ end
120
+
121
+ #
122
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
123
+ # template that can be used to create similar VMs.
124
+ #
125
+ # @param resource_group_name [String] The name of the resource group.
126
+ # @param vm_name [String] The name of the virtual machine.
127
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
128
+ # the Capture Virtual Machine operation.
129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
130
+ # will be added to the HTTP request.
131
+ #
132
+ # @return [VirtualMachineCaptureResult] operation results.
133
+ #
134
+ def capture(resource_group_name, vm_name, parameters, custom_headers:nil)
135
+ response = capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
136
+ response.body unless response.nil?
137
+ end
138
+
139
+ #
140
+ # @param resource_group_name [String] The name of the resource group.
141
+ # @param vm_name [String] The name of the virtual machine.
142
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
143
+ # the Capture Virtual Machine operation.
144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
+ # will be added to the HTTP request.
146
+ #
147
+ # @return [Concurrent::Promise] promise which provides async access to http
148
+ # response.
149
+ #
150
+ def capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
151
+ # Send request
152
+ promise = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
153
+
154
+ promise = promise.then do |response|
155
+ # Defining deserialization method.
156
+ deserialize_method = lambda do |parsed_response|
157
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineCaptureResult.mapper()
158
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
159
+ end
160
+
161
+ # Waiting for response.
162
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
163
+ end
164
+
165
+ promise
166
+ end
167
+
168
+ #
169
+ # The operation to create or update a virtual machine. Please note some
170
+ # properties can be set only during virtual machine creation.
171
+ #
172
+ # @param resource_group_name [String] The name of the resource group.
173
+ # @param vm_name [String] The name of the virtual machine.
174
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
175
+ # Machine operation.
176
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
177
+ # will be added to the HTTP request.
178
+ #
179
+ # @return [VirtualMachine] operation results.
180
+ #
181
+ def create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
182
+ response = create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
183
+ response.body unless response.nil?
184
+ end
185
+
186
+ #
187
+ # @param resource_group_name [String] The name of the resource group.
188
+ # @param vm_name [String] The name of the virtual machine.
189
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
190
+ # Machine operation.
191
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
192
+ # will be added to the HTTP request.
193
+ #
194
+ # @return [Concurrent::Promise] promise which provides async access to http
195
+ # response.
196
+ #
197
+ def create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
198
+ # Send request
199
+ promise = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
200
+
201
+ promise = promise.then do |response|
202
+ # Defining deserialization method.
203
+ deserialize_method = lambda do |parsed_response|
204
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
205
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
206
+ end
207
+
208
+ # Waiting for response.
209
+ @client.get_long_running_operation_result(response, deserialize_method)
210
+ end
211
+
212
+ promise
213
+ end
214
+
215
+ #
216
+ # The operation to update a virtual machine.
217
+ #
218
+ # @param resource_group_name [String] The name of the resource group.
219
+ # @param vm_name [String] The name of the virtual machine.
220
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
221
+ # Virtual Machine operation.
222
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
223
+ # will be added to the HTTP request.
224
+ #
225
+ # @return [VirtualMachine] operation results.
226
+ #
227
+ def update(resource_group_name, vm_name, parameters, custom_headers:nil)
228
+ response = update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
229
+ response.body unless response.nil?
230
+ end
231
+
232
+ #
233
+ # @param resource_group_name [String] The name of the resource group.
234
+ # @param vm_name [String] The name of the virtual machine.
235
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
236
+ # Virtual Machine operation.
237
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
238
+ # will be added to the HTTP request.
239
+ #
240
+ # @return [Concurrent::Promise] promise which provides async access to http
241
+ # response.
242
+ #
243
+ def update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
244
+ # Send request
245
+ promise = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
246
+
247
+ promise = promise.then do |response|
248
+ # Defining deserialization method.
249
+ deserialize_method = lambda do |parsed_response|
250
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
251
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
252
+ end
253
+
254
+ # Waiting for response.
255
+ @client.get_long_running_operation_result(response, deserialize_method)
256
+ end
257
+
258
+ promise
259
+ end
260
+
261
+ #
262
+ # The operation to delete a virtual machine.
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group.
265
+ # @param vm_name [String] The name of the virtual machine.
266
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
267
+ # will be added to the HTTP request.
268
+ #
269
+ def delete(resource_group_name, vm_name, custom_headers:nil)
270
+ response = delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
271
+ nil
272
+ end
273
+
274
+ #
275
+ # @param resource_group_name [String] The name of the resource group.
276
+ # @param vm_name [String] The name of the virtual machine.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [Concurrent::Promise] promise which provides async access to http
281
+ # response.
282
+ #
283
+ def delete_async(resource_group_name, vm_name, custom_headers:nil)
284
+ # Send request
285
+ promise = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers)
286
+
287
+ promise = promise.then do |response|
288
+ # Defining deserialization method.
289
+ deserialize_method = lambda do |parsed_response|
290
+ end
291
+
292
+ # Waiting for response.
293
+ @client.get_long_running_operation_result(response, deserialize_method)
294
+ end
295
+
296
+ promise
297
+ end
298
+
299
+ #
300
+ # Retrieves information about the model view or the instance view of a virtual
301
+ # machine.
302
+ #
303
+ # @param resource_group_name [String] The name of the resource group.
304
+ # @param vm_name [String] The name of the virtual machine.
305
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
306
+ # operation. Possible values include: 'instanceView'
307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
308
+ # will be added to the HTTP request.
309
+ #
310
+ # @return [VirtualMachine] operation results.
311
+ #
312
+ def get(resource_group_name, vm_name, expand:nil, custom_headers:nil)
313
+ response = get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
314
+ response.body unless response.nil?
315
+ end
316
+
317
+ #
318
+ # Retrieves information about the model view or the instance view of a virtual
319
+ # machine.
320
+ #
321
+ # @param resource_group_name [String] The name of the resource group.
322
+ # @param vm_name [String] The name of the virtual machine.
323
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
324
+ # operation. Possible values include: 'instanceView'
325
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
326
+ # will be added to the HTTP request.
327
+ #
328
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
329
+ #
330
+ def get_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil)
331
+ get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
332
+ end
333
+
334
+ #
335
+ # Retrieves information about the model view or the instance view of a virtual
336
+ # machine.
337
+ #
338
+ # @param resource_group_name [String] The name of the resource group.
339
+ # @param vm_name [String] The name of the virtual machine.
340
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
341
+ # operation. Possible values include: 'instanceView'
342
+ # @param [Hash{String => String}] A hash of custom headers that will be added
343
+ # to the HTTP request.
344
+ #
345
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
346
+ #
347
+ def get_async(resource_group_name, vm_name, expand:nil, custom_headers:nil)
348
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
349
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
350
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
351
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
352
+
353
+
354
+ request_headers = {}
355
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
356
+
357
+ # Set Headers
358
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
359
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
360
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
361
+
362
+ request_url = @base_url || @client.base_url
363
+
364
+ options = {
365
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
367
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
368
+ headers: request_headers.merge(custom_headers || {}),
369
+ base_url: request_url
370
+ }
371
+ promise = @client.make_request_async(:get, path_template, options)
372
+
373
+ promise = promise.then do |result|
374
+ http_response = result.response
375
+ status_code = http_response.status
376
+ response_content = http_response.body
377
+ unless status_code == 200
378
+ error_model = JSON.load(response_content)
379
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
380
+ end
381
+
382
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
383
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
384
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
385
+ # Deserialize Response
386
+ if status_code == 200
387
+ begin
388
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
389
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
390
+ result.body = @client.deserialize(result_mapper, parsed_response)
391
+ rescue Exception => e
392
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
393
+ end
394
+ end
395
+
396
+ result
397
+ end
398
+
399
+ promise.execute
400
+ end
401
+
402
+ #
403
+ # Retrieves information about the run-time state of a virtual machine.
404
+ #
405
+ # @param resource_group_name [String] The name of the resource group.
406
+ # @param vm_name [String] The name of the virtual machine.
407
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
408
+ # will be added to the HTTP request.
409
+ #
410
+ # @return [VirtualMachineInstanceView] operation results.
411
+ #
412
+ def instance_view(resource_group_name, vm_name, custom_headers:nil)
413
+ response = instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
414
+ response.body unless response.nil?
415
+ end
416
+
417
+ #
418
+ # Retrieves information about the run-time state of a virtual machine.
419
+ #
420
+ # @param resource_group_name [String] The name of the resource group.
421
+ # @param vm_name [String] The name of the virtual machine.
422
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
423
+ # will be added to the HTTP request.
424
+ #
425
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
426
+ #
427
+ def instance_view_with_http_info(resource_group_name, vm_name, custom_headers:nil)
428
+ instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
429
+ end
430
+
431
+ #
432
+ # Retrieves information about the run-time state of a virtual machine.
433
+ #
434
+ # @param resource_group_name [String] The name of the resource group.
435
+ # @param vm_name [String] The name of the virtual machine.
436
+ # @param [Hash{String => String}] A hash of custom headers that will be added
437
+ # to the HTTP request.
438
+ #
439
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
440
+ #
441
+ def instance_view_async(resource_group_name, vm_name, custom_headers:nil)
442
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
443
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
444
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
445
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
446
+
447
+
448
+ request_headers = {}
449
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
450
+
451
+ # Set Headers
452
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
453
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
454
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'
455
+
456
+ request_url = @base_url || @client.base_url
457
+
458
+ options = {
459
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
460
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
461
+ query_params: {'api-version' => @client.api_version},
462
+ headers: request_headers.merge(custom_headers || {}),
463
+ base_url: request_url
464
+ }
465
+ promise = @client.make_request_async(:get, path_template, options)
466
+
467
+ promise = promise.then do |result|
468
+ http_response = result.response
469
+ status_code = http_response.status
470
+ response_content = http_response.body
471
+ unless status_code == 200
472
+ error_model = JSON.load(response_content)
473
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
474
+ end
475
+
476
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
477
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
478
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
479
+ # Deserialize Response
480
+ if status_code == 200
481
+ begin
482
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
483
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineInstanceView.mapper()
484
+ result.body = @client.deserialize(result_mapper, parsed_response)
485
+ rescue Exception => e
486
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
487
+ end
488
+ end
489
+
490
+ result
491
+ end
492
+
493
+ promise.execute
494
+ end
495
+
496
+ #
497
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
498
+ # machine must be stop-deallocated before invoking this operation. <br>For
499
+ # Windows, please refer to [Convert a virtual machine from unmanaged disks to
500
+ # managed
501
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).<br>For
502
+ # Linux, please refer to [Convert a virtual machine from unmanaged disks to
503
+ # managed
504
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
505
+ #
506
+ # @param resource_group_name [String] The name of the resource group.
507
+ # @param vm_name [String] The name of the virtual machine.
508
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
509
+ # will be added to the HTTP request.
510
+ #
511
+ def convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
512
+ response = convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
513
+ nil
514
+ end
515
+
516
+ #
517
+ # @param resource_group_name [String] The name of the resource group.
518
+ # @param vm_name [String] The name of the virtual machine.
519
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
520
+ # will be added to the HTTP request.
521
+ #
522
+ # @return [Concurrent::Promise] promise which provides async access to http
523
+ # response.
524
+ #
525
+ def convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
526
+ # Send request
527
+ promise = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers)
528
+
529
+ promise = promise.then do |response|
530
+ # Defining deserialization method.
531
+ deserialize_method = lambda do |parsed_response|
532
+ end
533
+
534
+ # Waiting for response.
535
+ @client.get_long_running_operation_result(response, deserialize_method)
536
+ end
537
+
538
+ promise
539
+ end
540
+
541
+ #
542
+ # Shuts down the virtual machine and releases the compute resources. You are
543
+ # not billed for the compute resources that this virtual machine uses.
544
+ #
545
+ # @param resource_group_name [String] The name of the resource group.
546
+ # @param vm_name [String] The name of the virtual machine.
547
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
548
+ # will be added to the HTTP request.
549
+ #
550
+ def deallocate(resource_group_name, vm_name, custom_headers:nil)
551
+ response = deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
552
+ nil
553
+ end
554
+
555
+ #
556
+ # @param resource_group_name [String] The name of the resource group.
557
+ # @param vm_name [String] The name of the virtual machine.
558
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
559
+ # will be added to the HTTP request.
560
+ #
561
+ # @return [Concurrent::Promise] promise which provides async access to http
562
+ # response.
563
+ #
564
+ def deallocate_async(resource_group_name, vm_name, custom_headers:nil)
565
+ # Send request
566
+ promise = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers)
567
+
568
+ promise = promise.then do |response|
569
+ # Defining deserialization method.
570
+ deserialize_method = lambda do |parsed_response|
571
+ end
572
+
573
+ # Waiting for response.
574
+ @client.get_long_running_operation_result(response, deserialize_method)
575
+ end
576
+
577
+ promise
578
+ end
579
+
580
+ #
581
+ # Sets the OS state of the virtual machine to generalized. It is recommended to
582
+ # sysprep the virtual machine before performing this operation. <br>For
583
+ # Windows, please refer to [Create a managed image of a generalized VM in
584
+ # Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For
585
+ # Linux, please refer to [How to create an image of a virtual machine or
586
+ # VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
587
+ #
588
+ # @param resource_group_name [String] The name of the resource group.
589
+ # @param vm_name [String] The name of the virtual machine.
590
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
591
+ # will be added to the HTTP request.
592
+ #
593
+ #
594
+ def generalize(resource_group_name, vm_name, custom_headers:nil)
595
+ response = generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
596
+ nil
597
+ end
598
+
599
+ #
600
+ # Sets the OS state of the virtual machine to generalized. It is recommended to
601
+ # sysprep the virtual machine before performing this operation. <br>For
602
+ # Windows, please refer to [Create a managed image of a generalized VM in
603
+ # Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For
604
+ # Linux, please refer to [How to create an image of a virtual machine or
605
+ # VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
606
+ #
607
+ # @param resource_group_name [String] The name of the resource group.
608
+ # @param vm_name [String] The name of the virtual machine.
609
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
610
+ # will be added to the HTTP request.
611
+ #
612
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
613
+ #
614
+ def generalize_with_http_info(resource_group_name, vm_name, custom_headers:nil)
615
+ generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
616
+ end
617
+
618
+ #
619
+ # Sets the OS state of the virtual machine to generalized. It is recommended to
620
+ # sysprep the virtual machine before performing this operation. <br>For
621
+ # Windows, please refer to [Create a managed image of a generalized VM in
622
+ # Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For
623
+ # Linux, please refer to [How to create an image of a virtual machine or
624
+ # VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
625
+ #
626
+ # @param resource_group_name [String] The name of the resource group.
627
+ # @param vm_name [String] The name of the virtual machine.
628
+ # @param [Hash{String => String}] A hash of custom headers that will be added
629
+ # to the HTTP request.
630
+ #
631
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
632
+ #
633
+ def generalize_async(resource_group_name, vm_name, custom_headers:nil)
634
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
635
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
636
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
637
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
638
+
639
+
640
+ request_headers = {}
641
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
642
+
643
+ # Set Headers
644
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
645
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
646
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'
647
+
648
+ request_url = @base_url || @client.base_url
649
+
650
+ options = {
651
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
652
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
653
+ query_params: {'api-version' => @client.api_version},
654
+ headers: request_headers.merge(custom_headers || {}),
655
+ base_url: request_url
656
+ }
657
+ promise = @client.make_request_async(:post, path_template, options)
658
+
659
+ promise = promise.then do |result|
660
+ http_response = result.response
661
+ status_code = http_response.status
662
+ response_content = http_response.body
663
+ unless status_code == 200
664
+ error_model = JSON.load(response_content)
665
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
666
+ end
667
+
668
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
669
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
670
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
671
+
672
+ result
673
+ end
674
+
675
+ promise.execute
676
+ end
677
+
678
+ #
679
+ # Lists all of the virtual machines in the specified resource group. Use the
680
+ # nextLink property in the response to get the next page of virtual machines.
681
+ #
682
+ # @param resource_group_name [String] The name of the resource group.
683
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
684
+ # will be added to the HTTP request.
685
+ #
686
+ # @return [Array<VirtualMachine>] operation results.
687
+ #
688
+ def list(resource_group_name, custom_headers:nil)
689
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
690
+ first_page.get_all_items
691
+ end
692
+
693
+ #
694
+ # Lists all of the virtual machines in the specified resource group. Use the
695
+ # nextLink property in the response to get the next page of virtual machines.
696
+ #
697
+ # @param resource_group_name [String] The name of the resource group.
698
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
699
+ # will be added to the HTTP request.
700
+ #
701
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
702
+ #
703
+ def list_with_http_info(resource_group_name, custom_headers:nil)
704
+ list_async(resource_group_name, custom_headers:custom_headers).value!
705
+ end
706
+
707
+ #
708
+ # Lists all of the virtual machines in the specified resource group. Use the
709
+ # nextLink property in the response to get the next page of virtual machines.
710
+ #
711
+ # @param resource_group_name [String] The name of the resource group.
712
+ # @param [Hash{String => String}] A hash of custom headers that will be added
713
+ # to the HTTP request.
714
+ #
715
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
716
+ #
717
+ def list_async(resource_group_name, custom_headers:nil)
718
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
719
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
720
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
721
+
722
+
723
+ request_headers = {}
724
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
725
+
726
+ # Set Headers
727
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
728
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
729
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'
730
+
731
+ request_url = @base_url || @client.base_url
732
+
733
+ options = {
734
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
735
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
736
+ query_params: {'api-version' => @client.api_version},
737
+ headers: request_headers.merge(custom_headers || {}),
738
+ base_url: request_url
739
+ }
740
+ promise = @client.make_request_async(:get, path_template, options)
741
+
742
+ promise = promise.then do |result|
743
+ http_response = result.response
744
+ status_code = http_response.status
745
+ response_content = http_response.body
746
+ unless status_code == 200
747
+ error_model = JSON.load(response_content)
748
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
749
+ end
750
+
751
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
752
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
753
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
754
+ # Deserialize Response
755
+ if status_code == 200
756
+ begin
757
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
758
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineListResult.mapper()
759
+ result.body = @client.deserialize(result_mapper, parsed_response)
760
+ rescue Exception => e
761
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
762
+ end
763
+ end
764
+
765
+ result
766
+ end
767
+
768
+ promise.execute
769
+ end
770
+
771
+ #
772
+ # Lists all of the virtual machines in the specified subscription. Use the
773
+ # nextLink property in the response to get the next page of virtual machines.
774
+ #
775
+ # @param status_only [String] statusOnly=true enables fetching run time status
776
+ # of all Virtual Machines in the subscription.
777
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
778
+ # will be added to the HTTP request.
779
+ #
780
+ # @return [Array<VirtualMachine>] operation results.
781
+ #
782
+ def list_all(status_only:nil, custom_headers:nil)
783
+ first_page = list_all_as_lazy(status_only:status_only, custom_headers:custom_headers)
784
+ first_page.get_all_items
785
+ end
786
+
787
+ #
788
+ # Lists all of the virtual machines in the specified subscription. Use the
789
+ # nextLink property in the response to get the next page of virtual machines.
790
+ #
791
+ # @param status_only [String] statusOnly=true enables fetching run time status
792
+ # of all Virtual Machines in the subscription.
793
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
794
+ # will be added to the HTTP request.
795
+ #
796
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
797
+ #
798
+ def list_all_with_http_info(status_only:nil, custom_headers:nil)
799
+ list_all_async(status_only:status_only, custom_headers:custom_headers).value!
800
+ end
801
+
802
+ #
803
+ # Lists all of the virtual machines in the specified subscription. Use the
804
+ # nextLink property in the response to get the next page of virtual machines.
805
+ #
806
+ # @param status_only [String] statusOnly=true enables fetching run time status
807
+ # of all Virtual Machines in the subscription.
808
+ # @param [Hash{String => String}] A hash of custom headers that will be added
809
+ # to the HTTP request.
810
+ #
811
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
812
+ #
813
+ def list_all_async(status_only:nil, custom_headers:nil)
814
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
815
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
816
+
817
+
818
+ request_headers = {}
819
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
820
+
821
+ # Set Headers
822
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
823
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
824
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'
825
+
826
+ request_url = @base_url || @client.base_url
827
+
828
+ options = {
829
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
830
+ path_params: {'subscriptionId' => @client.subscription_id},
831
+ query_params: {'api-version' => @client.api_version,'statusOnly' => status_only},
832
+ headers: request_headers.merge(custom_headers || {}),
833
+ base_url: request_url
834
+ }
835
+ promise = @client.make_request_async(:get, path_template, options)
836
+
837
+ promise = promise.then do |result|
838
+ http_response = result.response
839
+ status_code = http_response.status
840
+ response_content = http_response.body
841
+ unless status_code == 200
842
+ error_model = JSON.load(response_content)
843
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
844
+ end
845
+
846
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
847
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
848
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
849
+ # Deserialize Response
850
+ if status_code == 200
851
+ begin
852
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
853
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineListResult.mapper()
854
+ result.body = @client.deserialize(result_mapper, parsed_response)
855
+ rescue Exception => e
856
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
857
+ end
858
+ end
859
+
860
+ result
861
+ end
862
+
863
+ promise.execute
864
+ end
865
+
866
+ #
867
+ # Lists all available virtual machine sizes to which the specified virtual
868
+ # machine can be resized.
869
+ #
870
+ # @param resource_group_name [String] The name of the resource group.
871
+ # @param vm_name [String] The name of the virtual machine.
872
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
873
+ # will be added to the HTTP request.
874
+ #
875
+ # @return [VirtualMachineSizeListResult] operation results.
876
+ #
877
+ def list_available_sizes(resource_group_name, vm_name, custom_headers:nil)
878
+ response = list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
879
+ response.body unless response.nil?
880
+ end
881
+
882
+ #
883
+ # Lists all available virtual machine sizes to which the specified virtual
884
+ # machine can be resized.
885
+ #
886
+ # @param resource_group_name [String] The name of the resource group.
887
+ # @param vm_name [String] The name of the virtual machine.
888
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
889
+ # will be added to the HTTP request.
890
+ #
891
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
892
+ #
893
+ def list_available_sizes_with_http_info(resource_group_name, vm_name, custom_headers:nil)
894
+ list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
895
+ end
896
+
897
+ #
898
+ # Lists all available virtual machine sizes to which the specified virtual
899
+ # machine can be resized.
900
+ #
901
+ # @param resource_group_name [String] The name of the resource group.
902
+ # @param vm_name [String] The name of the virtual machine.
903
+ # @param [Hash{String => String}] A hash of custom headers that will be added
904
+ # to the HTTP request.
905
+ #
906
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
907
+ #
908
+ def list_available_sizes_async(resource_group_name, vm_name, custom_headers:nil)
909
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
910
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
911
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
912
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
913
+
914
+
915
+ request_headers = {}
916
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
917
+
918
+ # Set Headers
919
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
920
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
921
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'
922
+
923
+ request_url = @base_url || @client.base_url
924
+
925
+ options = {
926
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
927
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
928
+ query_params: {'api-version' => @client.api_version},
929
+ headers: request_headers.merge(custom_headers || {}),
930
+ base_url: request_url
931
+ }
932
+ promise = @client.make_request_async(:get, path_template, options)
933
+
934
+ promise = promise.then do |result|
935
+ http_response = result.response
936
+ status_code = http_response.status
937
+ response_content = http_response.body
938
+ unless status_code == 200
939
+ error_model = JSON.load(response_content)
940
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
941
+ end
942
+
943
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
944
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
945
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
946
+ # Deserialize Response
947
+ if status_code == 200
948
+ begin
949
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
950
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineSizeListResult.mapper()
951
+ result.body = @client.deserialize(result_mapper, parsed_response)
952
+ rescue Exception => e
953
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
954
+ end
955
+ end
956
+
957
+ result
958
+ end
959
+
960
+ promise.execute
961
+ end
962
+
963
+ #
964
+ # The operation to power off (stop) a virtual machine. The virtual machine can
965
+ # be restarted with the same provisioned resources. You are still charged for
966
+ # this virtual machine.
967
+ #
968
+ # @param resource_group_name [String] The name of the resource group.
969
+ # @param vm_name [String] The name of the virtual machine.
970
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
971
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
972
+ # false indicates otherwise. Default value for this flag is false if not
973
+ # specified
974
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
975
+ # will be added to the HTTP request.
976
+ #
977
+ def power_off(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
978
+ response = power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
979
+ nil
980
+ end
981
+
982
+ #
983
+ # @param resource_group_name [String] The name of the resource group.
984
+ # @param vm_name [String] The name of the virtual machine.
985
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
986
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
987
+ # false indicates otherwise. Default value for this flag is false if not
988
+ # specified
989
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
990
+ # will be added to the HTTP request.
991
+ #
992
+ # @return [Concurrent::Promise] promise which provides async access to http
993
+ # response.
994
+ #
995
+ def power_off_async(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
996
+ # Send request
997
+ promise = begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers)
998
+
999
+ promise = promise.then do |response|
1000
+ # Defining deserialization method.
1001
+ deserialize_method = lambda do |parsed_response|
1002
+ end
1003
+
1004
+ # Waiting for response.
1005
+ @client.get_long_running_operation_result(response, deserialize_method)
1006
+ end
1007
+
1008
+ promise
1009
+ end
1010
+
1011
+ #
1012
+ # The operation to reapply a virtual machine's state.
1013
+ #
1014
+ # @param resource_group_name [String] The name of the resource group.
1015
+ # @param vm_name [String] The name of the virtual machine.
1016
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1017
+ # will be added to the HTTP request.
1018
+ #
1019
+ def reapply(resource_group_name, vm_name, custom_headers:nil)
1020
+ response = reapply_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1021
+ nil
1022
+ end
1023
+
1024
+ #
1025
+ # @param resource_group_name [String] The name of the resource group.
1026
+ # @param vm_name [String] The name of the virtual machine.
1027
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1028
+ # will be added to the HTTP request.
1029
+ #
1030
+ # @return [Concurrent::Promise] promise which provides async access to http
1031
+ # response.
1032
+ #
1033
+ def reapply_async(resource_group_name, vm_name, custom_headers:nil)
1034
+ # Send request
1035
+ promise = begin_reapply_async(resource_group_name, vm_name, custom_headers:custom_headers)
1036
+
1037
+ promise = promise.then do |response|
1038
+ # Defining deserialization method.
1039
+ deserialize_method = lambda do |parsed_response|
1040
+ end
1041
+
1042
+ # Waiting for response.
1043
+ @client.get_long_running_operation_result(response, deserialize_method)
1044
+ end
1045
+
1046
+ promise
1047
+ end
1048
+
1049
+ #
1050
+ # The operation to restart a virtual machine.
1051
+ #
1052
+ # @param resource_group_name [String] The name of the resource group.
1053
+ # @param vm_name [String] The name of the virtual machine.
1054
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1055
+ # will be added to the HTTP request.
1056
+ #
1057
+ def restart(resource_group_name, vm_name, custom_headers:nil)
1058
+ response = restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1059
+ nil
1060
+ end
1061
+
1062
+ #
1063
+ # @param resource_group_name [String] The name of the resource group.
1064
+ # @param vm_name [String] The name of the virtual machine.
1065
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1066
+ # will be added to the HTTP request.
1067
+ #
1068
+ # @return [Concurrent::Promise] promise which provides async access to http
1069
+ # response.
1070
+ #
1071
+ def restart_async(resource_group_name, vm_name, custom_headers:nil)
1072
+ # Send request
1073
+ promise = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers)
1074
+
1075
+ promise = promise.then do |response|
1076
+ # Defining deserialization method.
1077
+ deserialize_method = lambda do |parsed_response|
1078
+ end
1079
+
1080
+ # Waiting for response.
1081
+ @client.get_long_running_operation_result(response, deserialize_method)
1082
+ end
1083
+
1084
+ promise
1085
+ end
1086
+
1087
+ #
1088
+ # The operation to start a virtual machine.
1089
+ #
1090
+ # @param resource_group_name [String] The name of the resource group.
1091
+ # @param vm_name [String] The name of the virtual machine.
1092
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1093
+ # will be added to the HTTP request.
1094
+ #
1095
+ def start(resource_group_name, vm_name, custom_headers:nil)
1096
+ response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1097
+ nil
1098
+ end
1099
+
1100
+ #
1101
+ # @param resource_group_name [String] The name of the resource group.
1102
+ # @param vm_name [String] The name of the virtual machine.
1103
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1104
+ # will be added to the HTTP request.
1105
+ #
1106
+ # @return [Concurrent::Promise] promise which provides async access to http
1107
+ # response.
1108
+ #
1109
+ def start_async(resource_group_name, vm_name, custom_headers:nil)
1110
+ # Send request
1111
+ promise = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers)
1112
+
1113
+ promise = promise.then do |response|
1114
+ # Defining deserialization method.
1115
+ deserialize_method = lambda do |parsed_response|
1116
+ end
1117
+
1118
+ # Waiting for response.
1119
+ @client.get_long_running_operation_result(response, deserialize_method)
1120
+ end
1121
+
1122
+ promise
1123
+ end
1124
+
1125
+ #
1126
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
1127
+ # on.
1128
+ #
1129
+ # @param resource_group_name [String] The name of the resource group.
1130
+ # @param vm_name [String] The name of the virtual machine.
1131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1132
+ # will be added to the HTTP request.
1133
+ #
1134
+ def redeploy(resource_group_name, vm_name, custom_headers:nil)
1135
+ response = redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1136
+ nil
1137
+ end
1138
+
1139
+ #
1140
+ # @param resource_group_name [String] The name of the resource group.
1141
+ # @param vm_name [String] The name of the virtual machine.
1142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1143
+ # will be added to the HTTP request.
1144
+ #
1145
+ # @return [Concurrent::Promise] promise which provides async access to http
1146
+ # response.
1147
+ #
1148
+ def redeploy_async(resource_group_name, vm_name, custom_headers:nil)
1149
+ # Send request
1150
+ promise = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers)
1151
+
1152
+ promise = promise.then do |response|
1153
+ # Defining deserialization method.
1154
+ deserialize_method = lambda do |parsed_response|
1155
+ end
1156
+
1157
+ # Waiting for response.
1158
+ @client.get_long_running_operation_result(response, deserialize_method)
1159
+ end
1160
+
1161
+ promise
1162
+ end
1163
+
1164
+ #
1165
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
1166
+ # initial state.
1167
+ #
1168
+ # @param resource_group_name [String] The name of the resource group.
1169
+ # @param vm_name [String] The name of the virtual machine.
1170
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1171
+ # the Reimage Virtual Machine operation.
1172
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1173
+ # will be added to the HTTP request.
1174
+ #
1175
+ def reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1176
+ response = reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
1177
+ nil
1178
+ end
1179
+
1180
+ #
1181
+ # @param resource_group_name [String] The name of the resource group.
1182
+ # @param vm_name [String] The name of the virtual machine.
1183
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1184
+ # the Reimage Virtual Machine operation.
1185
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1186
+ # will be added to the HTTP request.
1187
+ #
1188
+ # @return [Concurrent::Promise] promise which provides async access to http
1189
+ # response.
1190
+ #
1191
+ def reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1192
+ # Send request
1193
+ promise = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers)
1194
+
1195
+ promise = promise.then do |response|
1196
+ # Defining deserialization method.
1197
+ deserialize_method = lambda do |parsed_response|
1198
+ end
1199
+
1200
+ # Waiting for response.
1201
+ @client.get_long_running_operation_result(response, deserialize_method)
1202
+ end
1203
+
1204
+ promise
1205
+ end
1206
+
1207
+ #
1208
+ # Shuts down the virtual machine, moves it to an already updated node, and
1209
+ # powers it back on during the self-service phase of planned maintenance.
1210
+ #
1211
+ # @param resource_group_name [String] The name of the resource group.
1212
+ # @param vm_name [String] The name of the virtual machine.
1213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1214
+ # will be added to the HTTP request.
1215
+ #
1216
+ def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
1217
+ response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1218
+ nil
1219
+ end
1220
+
1221
+ #
1222
+ # @param resource_group_name [String] The name of the resource group.
1223
+ # @param vm_name [String] The name of the virtual machine.
1224
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1225
+ # will be added to the HTTP request.
1226
+ #
1227
+ # @return [Concurrent::Promise] promise which provides async access to http
1228
+ # response.
1229
+ #
1230
+ def perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
1231
+ # Send request
1232
+ promise = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers)
1233
+
1234
+ promise = promise.then do |response|
1235
+ # Defining deserialization method.
1236
+ deserialize_method = lambda do |parsed_response|
1237
+ end
1238
+
1239
+ # Waiting for response.
1240
+ @client.get_long_running_operation_result(response, deserialize_method)
1241
+ end
1242
+
1243
+ promise
1244
+ end
1245
+
1246
+ #
1247
+ # The operation to simulate the eviction of spot virtual machine. The eviction
1248
+ # will occur within 30 minutes of calling the API
1249
+ #
1250
+ # @param resource_group_name [String] The name of the resource group.
1251
+ # @param vm_name [String] The name of the virtual machine.
1252
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1253
+ # will be added to the HTTP request.
1254
+ #
1255
+ #
1256
+ def simulate_eviction(resource_group_name, vm_name, custom_headers:nil)
1257
+ response = simulate_eviction_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1258
+ nil
1259
+ end
1260
+
1261
+ #
1262
+ # The operation to simulate the eviction of spot virtual machine. The eviction
1263
+ # will occur within 30 minutes of calling the API
1264
+ #
1265
+ # @param resource_group_name [String] The name of the resource group.
1266
+ # @param vm_name [String] The name of the virtual machine.
1267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1268
+ # will be added to the HTTP request.
1269
+ #
1270
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1271
+ #
1272
+ def simulate_eviction_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1273
+ simulate_eviction_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1274
+ end
1275
+
1276
+ #
1277
+ # The operation to simulate the eviction of spot virtual machine. The eviction
1278
+ # will occur within 30 minutes of calling the API
1279
+ #
1280
+ # @param resource_group_name [String] The name of the resource group.
1281
+ # @param vm_name [String] The name of the virtual machine.
1282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1283
+ # to the HTTP request.
1284
+ #
1285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1286
+ #
1287
+ def simulate_eviction_async(resource_group_name, vm_name, custom_headers:nil)
1288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1289
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1290
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1291
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1292
+
1293
+
1294
+ request_headers = {}
1295
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1296
+
1297
+ # Set Headers
1298
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1299
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1300
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction'
1301
+
1302
+ request_url = @base_url || @client.base_url
1303
+
1304
+ options = {
1305
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1306
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1307
+ query_params: {'api-version' => @client.api_version},
1308
+ headers: request_headers.merge(custom_headers || {}),
1309
+ base_url: request_url
1310
+ }
1311
+ promise = @client.make_request_async(:post, path_template, options)
1312
+
1313
+ promise = promise.then do |result|
1314
+ http_response = result.response
1315
+ status_code = http_response.status
1316
+ response_content = http_response.body
1317
+ unless status_code == 204
1318
+ error_model = JSON.load(response_content)
1319
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1320
+ end
1321
+
1322
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1323
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1324
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1325
+
1326
+ result
1327
+ end
1328
+
1329
+ promise.execute
1330
+ end
1331
+
1332
+ #
1333
+ # Run command on the VM.
1334
+ #
1335
+ # @param resource_group_name [String] The name of the resource group.
1336
+ # @param vm_name [String] The name of the virtual machine.
1337
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1338
+ # operation.
1339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1340
+ # will be added to the HTTP request.
1341
+ #
1342
+ # @return [RunCommandResult] operation results.
1343
+ #
1344
+ def run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
1345
+ response = run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1346
+ response.body unless response.nil?
1347
+ end
1348
+
1349
+ #
1350
+ # @param resource_group_name [String] The name of the resource group.
1351
+ # @param vm_name [String] The name of the virtual machine.
1352
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1353
+ # operation.
1354
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1355
+ # will be added to the HTTP request.
1356
+ #
1357
+ # @return [Concurrent::Promise] promise which provides async access to http
1358
+ # response.
1359
+ #
1360
+ def run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1361
+ # Send request
1362
+ promise = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
1363
+
1364
+ promise = promise.then do |response|
1365
+ # Defining deserialization method.
1366
+ deserialize_method = lambda do |parsed_response|
1367
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::RunCommandResult.mapper()
1368
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1369
+ end
1370
+
1371
+ # Waiting for response.
1372
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1373
+ end
1374
+
1375
+ promise
1376
+ end
1377
+
1378
+ #
1379
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1380
+ # template that can be used to create similar VMs.
1381
+ #
1382
+ # @param resource_group_name [String] The name of the resource group.
1383
+ # @param vm_name [String] The name of the virtual machine.
1384
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1385
+ # the Capture Virtual Machine operation.
1386
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1387
+ # will be added to the HTTP request.
1388
+ #
1389
+ # @return [VirtualMachineCaptureResult] operation results.
1390
+ #
1391
+ def begin_capture(resource_group_name, vm_name, parameters, custom_headers:nil)
1392
+ response = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1393
+ response.body unless response.nil?
1394
+ end
1395
+
1396
+ #
1397
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1398
+ # template that can be used to create similar VMs.
1399
+ #
1400
+ # @param resource_group_name [String] The name of the resource group.
1401
+ # @param vm_name [String] The name of the virtual machine.
1402
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1403
+ # the Capture Virtual Machine operation.
1404
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1405
+ # will be added to the HTTP request.
1406
+ #
1407
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1408
+ #
1409
+ def begin_capture_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1410
+ begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1411
+ end
1412
+
1413
+ #
1414
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1415
+ # template that can be used to create similar VMs.
1416
+ #
1417
+ # @param resource_group_name [String] The name of the resource group.
1418
+ # @param vm_name [String] The name of the virtual machine.
1419
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1420
+ # the Capture Virtual Machine operation.
1421
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1422
+ # to the HTTP request.
1423
+ #
1424
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1425
+ #
1426
+ def begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1427
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1428
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1429
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1430
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1431
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1432
+
1433
+
1434
+ request_headers = {}
1435
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1436
+
1437
+ # Set Headers
1438
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1439
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1440
+
1441
+ # Serialize Request
1442
+ request_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineCaptureParameters.mapper()
1443
+ request_content = @client.serialize(request_mapper, parameters)
1444
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1445
+
1446
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'
1447
+
1448
+ request_url = @base_url || @client.base_url
1449
+
1450
+ options = {
1451
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1452
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1453
+ query_params: {'api-version' => @client.api_version},
1454
+ body: request_content,
1455
+ headers: request_headers.merge(custom_headers || {}),
1456
+ base_url: request_url
1457
+ }
1458
+ promise = @client.make_request_async(:post, path_template, options)
1459
+
1460
+ promise = promise.then do |result|
1461
+ http_response = result.response
1462
+ status_code = http_response.status
1463
+ response_content = http_response.body
1464
+ unless status_code == 200 || status_code == 202
1465
+ error_model = JSON.load(response_content)
1466
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1467
+ end
1468
+
1469
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1470
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1471
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1472
+ # Deserialize Response
1473
+ if status_code == 200
1474
+ begin
1475
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1476
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineCaptureResult.mapper()
1477
+ result.body = @client.deserialize(result_mapper, parsed_response)
1478
+ rescue Exception => e
1479
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1480
+ end
1481
+ end
1482
+
1483
+ result
1484
+ end
1485
+
1486
+ promise.execute
1487
+ end
1488
+
1489
+ #
1490
+ # The operation to create or update a virtual machine. Please note some
1491
+ # properties can be set only during virtual machine creation.
1492
+ #
1493
+ # @param resource_group_name [String] The name of the resource group.
1494
+ # @param vm_name [String] The name of the virtual machine.
1495
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1496
+ # Machine operation.
1497
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1498
+ # will be added to the HTTP request.
1499
+ #
1500
+ # @return [VirtualMachine] operation results.
1501
+ #
1502
+ def begin_create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1503
+ response = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1504
+ response.body unless response.nil?
1505
+ end
1506
+
1507
+ #
1508
+ # The operation to create or update a virtual machine. Please note some
1509
+ # properties can be set only during virtual machine creation.
1510
+ #
1511
+ # @param resource_group_name [String] The name of the resource group.
1512
+ # @param vm_name [String] The name of the virtual machine.
1513
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1514
+ # Machine operation.
1515
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1516
+ # will be added to the HTTP request.
1517
+ #
1518
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1519
+ #
1520
+ def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1521
+ begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1522
+ end
1523
+
1524
+ #
1525
+ # The operation to create or update a virtual machine. Please note some
1526
+ # properties can be set only during virtual machine creation.
1527
+ #
1528
+ # @param resource_group_name [String] The name of the resource group.
1529
+ # @param vm_name [String] The name of the virtual machine.
1530
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1531
+ # Machine operation.
1532
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1533
+ # to the HTTP request.
1534
+ #
1535
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1536
+ #
1537
+ def begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1538
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1539
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1540
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1541
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1542
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1543
+
1544
+
1545
+ request_headers = {}
1546
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1547
+
1548
+ # Set Headers
1549
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1550
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1551
+
1552
+ # Serialize Request
1553
+ request_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
1554
+ request_content = @client.serialize(request_mapper, parameters)
1555
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1556
+
1557
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1558
+
1559
+ request_url = @base_url || @client.base_url
1560
+
1561
+ options = {
1562
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1563
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1564
+ query_params: {'api-version' => @client.api_version},
1565
+ body: request_content,
1566
+ headers: request_headers.merge(custom_headers || {}),
1567
+ base_url: request_url
1568
+ }
1569
+ promise = @client.make_request_async(:put, path_template, options)
1570
+
1571
+ promise = promise.then do |result|
1572
+ http_response = result.response
1573
+ status_code = http_response.status
1574
+ response_content = http_response.body
1575
+ unless status_code == 200 || status_code == 201
1576
+ error_model = JSON.load(response_content)
1577
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1578
+ end
1579
+
1580
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1581
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1582
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1583
+ # Deserialize Response
1584
+ if status_code == 200
1585
+ begin
1586
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1587
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
1588
+ result.body = @client.deserialize(result_mapper, parsed_response)
1589
+ rescue Exception => e
1590
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1591
+ end
1592
+ end
1593
+ # Deserialize Response
1594
+ if status_code == 201
1595
+ begin
1596
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1597
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
1598
+ result.body = @client.deserialize(result_mapper, parsed_response)
1599
+ rescue Exception => e
1600
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1601
+ end
1602
+ end
1603
+
1604
+ result
1605
+ end
1606
+
1607
+ promise.execute
1608
+ end
1609
+
1610
+ #
1611
+ # The operation to update a virtual machine.
1612
+ #
1613
+ # @param resource_group_name [String] The name of the resource group.
1614
+ # @param vm_name [String] The name of the virtual machine.
1615
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1616
+ # Virtual Machine operation.
1617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1618
+ # will be added to the HTTP request.
1619
+ #
1620
+ # @return [VirtualMachine] operation results.
1621
+ #
1622
+ def begin_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1623
+ response = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1624
+ response.body unless response.nil?
1625
+ end
1626
+
1627
+ #
1628
+ # The operation to update a virtual machine.
1629
+ #
1630
+ # @param resource_group_name [String] The name of the resource group.
1631
+ # @param vm_name [String] The name of the virtual machine.
1632
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1633
+ # Virtual Machine operation.
1634
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1635
+ # will be added to the HTTP request.
1636
+ #
1637
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1638
+ #
1639
+ def begin_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1640
+ begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1641
+ end
1642
+
1643
+ #
1644
+ # The operation to update a virtual machine.
1645
+ #
1646
+ # @param resource_group_name [String] The name of the resource group.
1647
+ # @param vm_name [String] The name of the virtual machine.
1648
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1649
+ # Virtual Machine operation.
1650
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1651
+ # to the HTTP request.
1652
+ #
1653
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1654
+ #
1655
+ def begin_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1656
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1657
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1658
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1659
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1660
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1661
+
1662
+
1663
+ request_headers = {}
1664
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1665
+
1666
+ # Set Headers
1667
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1668
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1669
+
1670
+ # Serialize Request
1671
+ request_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineUpdate.mapper()
1672
+ request_content = @client.serialize(request_mapper, parameters)
1673
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1674
+
1675
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1676
+
1677
+ request_url = @base_url || @client.base_url
1678
+
1679
+ options = {
1680
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1681
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1682
+ query_params: {'api-version' => @client.api_version},
1683
+ body: request_content,
1684
+ headers: request_headers.merge(custom_headers || {}),
1685
+ base_url: request_url
1686
+ }
1687
+ promise = @client.make_request_async(:patch, path_template, options)
1688
+
1689
+ promise = promise.then do |result|
1690
+ http_response = result.response
1691
+ status_code = http_response.status
1692
+ response_content = http_response.body
1693
+ unless status_code == 200 || status_code == 201
1694
+ error_model = JSON.load(response_content)
1695
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1696
+ end
1697
+
1698
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1699
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1700
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1701
+ # Deserialize Response
1702
+ if status_code == 200
1703
+ begin
1704
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1705
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
1706
+ result.body = @client.deserialize(result_mapper, parsed_response)
1707
+ rescue Exception => e
1708
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1709
+ end
1710
+ end
1711
+ # Deserialize Response
1712
+ if status_code == 201
1713
+ begin
1714
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1715
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachine.mapper()
1716
+ result.body = @client.deserialize(result_mapper, parsed_response)
1717
+ rescue Exception => e
1718
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1719
+ end
1720
+ end
1721
+
1722
+ result
1723
+ end
1724
+
1725
+ promise.execute
1726
+ end
1727
+
1728
+ #
1729
+ # The operation to delete a virtual machine.
1730
+ #
1731
+ # @param resource_group_name [String] The name of the resource group.
1732
+ # @param vm_name [String] The name of the virtual machine.
1733
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1734
+ # will be added to the HTTP request.
1735
+ #
1736
+ #
1737
+ def begin_delete(resource_group_name, vm_name, custom_headers:nil)
1738
+ response = begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1739
+ nil
1740
+ end
1741
+
1742
+ #
1743
+ # The operation to delete a virtual machine.
1744
+ #
1745
+ # @param resource_group_name [String] The name of the resource group.
1746
+ # @param vm_name [String] The name of the virtual machine.
1747
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1748
+ # will be added to the HTTP request.
1749
+ #
1750
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1751
+ #
1752
+ def begin_delete_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1753
+ begin_delete_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1754
+ end
1755
+
1756
+ #
1757
+ # The operation to delete a virtual machine.
1758
+ #
1759
+ # @param resource_group_name [String] The name of the resource group.
1760
+ # @param vm_name [String] The name of the virtual machine.
1761
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1762
+ # to the HTTP request.
1763
+ #
1764
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1765
+ #
1766
+ def begin_delete_async(resource_group_name, vm_name, custom_headers:nil)
1767
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1768
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1769
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1770
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1771
+
1772
+
1773
+ request_headers = {}
1774
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1775
+
1776
+ # Set Headers
1777
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1778
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1779
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1780
+
1781
+ request_url = @base_url || @client.base_url
1782
+
1783
+ options = {
1784
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1785
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1786
+ query_params: {'api-version' => @client.api_version},
1787
+ headers: request_headers.merge(custom_headers || {}),
1788
+ base_url: request_url
1789
+ }
1790
+ promise = @client.make_request_async(:delete, path_template, options)
1791
+
1792
+ promise = promise.then do |result|
1793
+ http_response = result.response
1794
+ status_code = http_response.status
1795
+ response_content = http_response.body
1796
+ unless status_code == 200 || status_code == 202 || status_code == 204
1797
+ error_model = JSON.load(response_content)
1798
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1799
+ end
1800
+
1801
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1802
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1803
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1804
+
1805
+ result
1806
+ end
1807
+
1808
+ promise.execute
1809
+ end
1810
+
1811
+ #
1812
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1813
+ # machine must be stop-deallocated before invoking this operation. <br>For
1814
+ # Windows, please refer to [Convert a virtual machine from unmanaged disks to
1815
+ # managed
1816
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).<br>For
1817
+ # Linux, please refer to [Convert a virtual machine from unmanaged disks to
1818
+ # managed
1819
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
1820
+ #
1821
+ # @param resource_group_name [String] The name of the resource group.
1822
+ # @param vm_name [String] The name of the virtual machine.
1823
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1824
+ # will be added to the HTTP request.
1825
+ #
1826
+ #
1827
+ def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
1828
+ response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1829
+ nil
1830
+ end
1831
+
1832
+ #
1833
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1834
+ # machine must be stop-deallocated before invoking this operation. <br>For
1835
+ # Windows, please refer to [Convert a virtual machine from unmanaged disks to
1836
+ # managed
1837
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).<br>For
1838
+ # Linux, please refer to [Convert a virtual machine from unmanaged disks to
1839
+ # managed
1840
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
1841
+ #
1842
+ # @param resource_group_name [String] The name of the resource group.
1843
+ # @param vm_name [String] The name of the virtual machine.
1844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1845
+ # will be added to the HTTP request.
1846
+ #
1847
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1848
+ #
1849
+ def begin_convert_to_managed_disks_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1850
+ begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1851
+ end
1852
+
1853
+ #
1854
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1855
+ # machine must be stop-deallocated before invoking this operation. <br>For
1856
+ # Windows, please refer to [Convert a virtual machine from unmanaged disks to
1857
+ # managed
1858
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).<br>For
1859
+ # Linux, please refer to [Convert a virtual machine from unmanaged disks to
1860
+ # managed
1861
+ # disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks).
1862
+ #
1863
+ # @param resource_group_name [String] The name of the resource group.
1864
+ # @param vm_name [String] The name of the virtual machine.
1865
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1866
+ # to the HTTP request.
1867
+ #
1868
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1869
+ #
1870
+ def begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
1871
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1872
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1873
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1874
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1875
+
1876
+
1877
+ request_headers = {}
1878
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1879
+
1880
+ # Set Headers
1881
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1882
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1883
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'
1884
+
1885
+ request_url = @base_url || @client.base_url
1886
+
1887
+ options = {
1888
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1889
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1890
+ query_params: {'api-version' => @client.api_version},
1891
+ headers: request_headers.merge(custom_headers || {}),
1892
+ base_url: request_url
1893
+ }
1894
+ promise = @client.make_request_async(:post, path_template, options)
1895
+
1896
+ promise = promise.then do |result|
1897
+ http_response = result.response
1898
+ status_code = http_response.status
1899
+ response_content = http_response.body
1900
+ unless status_code == 200 || status_code == 202
1901
+ error_model = JSON.load(response_content)
1902
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1903
+ end
1904
+
1905
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1906
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1907
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1908
+
1909
+ result
1910
+ end
1911
+
1912
+ promise.execute
1913
+ end
1914
+
1915
+ #
1916
+ # Shuts down the virtual machine and releases the compute resources. You are
1917
+ # not billed for the compute resources that this virtual machine uses.
1918
+ #
1919
+ # @param resource_group_name [String] The name of the resource group.
1920
+ # @param vm_name [String] The name of the virtual machine.
1921
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1922
+ # will be added to the HTTP request.
1923
+ #
1924
+ #
1925
+ def begin_deallocate(resource_group_name, vm_name, custom_headers:nil)
1926
+ response = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1927
+ nil
1928
+ end
1929
+
1930
+ #
1931
+ # Shuts down the virtual machine and releases the compute resources. You are
1932
+ # not billed for the compute resources that this virtual machine uses.
1933
+ #
1934
+ # @param resource_group_name [String] The name of the resource group.
1935
+ # @param vm_name [String] The name of the virtual machine.
1936
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1937
+ # will be added to the HTTP request.
1938
+ #
1939
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1940
+ #
1941
+ def begin_deallocate_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1942
+ begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1943
+ end
1944
+
1945
+ #
1946
+ # Shuts down the virtual machine and releases the compute resources. You are
1947
+ # not billed for the compute resources that this virtual machine uses.
1948
+ #
1949
+ # @param resource_group_name [String] The name of the resource group.
1950
+ # @param vm_name [String] The name of the virtual machine.
1951
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1952
+ # to the HTTP request.
1953
+ #
1954
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1955
+ #
1956
+ def begin_deallocate_async(resource_group_name, vm_name, custom_headers:nil)
1957
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1958
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1959
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1960
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1961
+
1962
+
1963
+ request_headers = {}
1964
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1965
+
1966
+ # Set Headers
1967
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1968
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1969
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'
1970
+
1971
+ request_url = @base_url || @client.base_url
1972
+
1973
+ options = {
1974
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1975
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1976
+ query_params: {'api-version' => @client.api_version},
1977
+ headers: request_headers.merge(custom_headers || {}),
1978
+ base_url: request_url
1979
+ }
1980
+ promise = @client.make_request_async(:post, path_template, options)
1981
+
1982
+ promise = promise.then do |result|
1983
+ http_response = result.response
1984
+ status_code = http_response.status
1985
+ response_content = http_response.body
1986
+ unless status_code == 200 || status_code == 202
1987
+ error_model = JSON.load(response_content)
1988
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1989
+ end
1990
+
1991
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1992
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1993
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1994
+
1995
+ result
1996
+ end
1997
+
1998
+ promise.execute
1999
+ end
2000
+
2001
+ #
2002
+ # The operation to power off (stop) a virtual machine. The virtual machine can
2003
+ # be restarted with the same provisioned resources. You are still charged for
2004
+ # this virtual machine.
2005
+ #
2006
+ # @param resource_group_name [String] The name of the resource group.
2007
+ # @param vm_name [String] The name of the virtual machine.
2008
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
2009
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
2010
+ # false indicates otherwise. Default value for this flag is false if not
2011
+ # specified
2012
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2013
+ # will be added to the HTTP request.
2014
+ #
2015
+ #
2016
+ def begin_power_off(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
2017
+ response = begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
2018
+ nil
2019
+ end
2020
+
2021
+ #
2022
+ # The operation to power off (stop) a virtual machine. The virtual machine can
2023
+ # be restarted with the same provisioned resources. You are still charged for
2024
+ # this virtual machine.
2025
+ #
2026
+ # @param resource_group_name [String] The name of the resource group.
2027
+ # @param vm_name [String] The name of the virtual machine.
2028
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
2029
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
2030
+ # false indicates otherwise. Default value for this flag is false if not
2031
+ # specified
2032
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2033
+ # will be added to the HTTP request.
2034
+ #
2035
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2036
+ #
2037
+ def begin_power_off_with_http_info(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
2038
+ begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
2039
+ end
2040
+
2041
+ #
2042
+ # The operation to power off (stop) a virtual machine. The virtual machine can
2043
+ # be restarted with the same provisioned resources. You are still charged for
2044
+ # this virtual machine.
2045
+ #
2046
+ # @param resource_group_name [String] The name of the resource group.
2047
+ # @param vm_name [String] The name of the virtual machine.
2048
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
2049
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
2050
+ # false indicates otherwise. Default value for this flag is false if not
2051
+ # specified
2052
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2053
+ # to the HTTP request.
2054
+ #
2055
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2056
+ #
2057
+ def begin_power_off_async(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
2058
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2059
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2060
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2061
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2062
+
2063
+
2064
+ request_headers = {}
2065
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2066
+
2067
+ # Set Headers
2068
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2069
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2070
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'
2071
+
2072
+ request_url = @base_url || @client.base_url
2073
+
2074
+ options = {
2075
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2076
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2077
+ query_params: {'skipShutdown' => skip_shutdown,'api-version' => @client.api_version},
2078
+ headers: request_headers.merge(custom_headers || {}),
2079
+ base_url: request_url
2080
+ }
2081
+ promise = @client.make_request_async(:post, path_template, options)
2082
+
2083
+ promise = promise.then do |result|
2084
+ http_response = result.response
2085
+ status_code = http_response.status
2086
+ response_content = http_response.body
2087
+ unless status_code == 200 || status_code == 202
2088
+ error_model = JSON.load(response_content)
2089
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2090
+ end
2091
+
2092
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2093
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2094
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2095
+
2096
+ result
2097
+ end
2098
+
2099
+ promise.execute
2100
+ end
2101
+
2102
+ #
2103
+ # The operation to reapply a virtual machine's state.
2104
+ #
2105
+ # @param resource_group_name [String] The name of the resource group.
2106
+ # @param vm_name [String] The name of the virtual machine.
2107
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2108
+ # will be added to the HTTP request.
2109
+ #
2110
+ #
2111
+ def begin_reapply(resource_group_name, vm_name, custom_headers:nil)
2112
+ response = begin_reapply_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2113
+ nil
2114
+ end
2115
+
2116
+ #
2117
+ # The operation to reapply a virtual machine's state.
2118
+ #
2119
+ # @param resource_group_name [String] The name of the resource group.
2120
+ # @param vm_name [String] The name of the virtual machine.
2121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2122
+ # will be added to the HTTP request.
2123
+ #
2124
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2125
+ #
2126
+ def begin_reapply_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2127
+ begin_reapply_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2128
+ end
2129
+
2130
+ #
2131
+ # The operation to reapply a virtual machine's state.
2132
+ #
2133
+ # @param resource_group_name [String] The name of the resource group.
2134
+ # @param vm_name [String] The name of the virtual machine.
2135
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2136
+ # to the HTTP request.
2137
+ #
2138
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2139
+ #
2140
+ def begin_reapply_async(resource_group_name, vm_name, custom_headers:nil)
2141
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2142
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2143
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2144
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2145
+
2146
+
2147
+ request_headers = {}
2148
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2149
+
2150
+ # Set Headers
2151
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2152
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2153
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply'
2154
+
2155
+ request_url = @base_url || @client.base_url
2156
+
2157
+ options = {
2158
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2159
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2160
+ query_params: {'api-version' => @client.api_version},
2161
+ headers: request_headers.merge(custom_headers || {}),
2162
+ base_url: request_url
2163
+ }
2164
+ promise = @client.make_request_async(:post, path_template, options)
2165
+
2166
+ promise = promise.then do |result|
2167
+ http_response = result.response
2168
+ status_code = http_response.status
2169
+ response_content = http_response.body
2170
+ unless status_code == 200 || status_code == 202
2171
+ error_model = JSON.load(response_content)
2172
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2173
+ end
2174
+
2175
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2176
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2177
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2178
+
2179
+ result
2180
+ end
2181
+
2182
+ promise.execute
2183
+ end
2184
+
2185
+ #
2186
+ # The operation to restart a virtual machine.
2187
+ #
2188
+ # @param resource_group_name [String] The name of the resource group.
2189
+ # @param vm_name [String] The name of the virtual machine.
2190
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2191
+ # will be added to the HTTP request.
2192
+ #
2193
+ #
2194
+ def begin_restart(resource_group_name, vm_name, custom_headers:nil)
2195
+ response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2196
+ nil
2197
+ end
2198
+
2199
+ #
2200
+ # The operation to restart a virtual machine.
2201
+ #
2202
+ # @param resource_group_name [String] The name of the resource group.
2203
+ # @param vm_name [String] The name of the virtual machine.
2204
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2205
+ # will be added to the HTTP request.
2206
+ #
2207
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2208
+ #
2209
+ def begin_restart_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2210
+ begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2211
+ end
2212
+
2213
+ #
2214
+ # The operation to restart a virtual machine.
2215
+ #
2216
+ # @param resource_group_name [String] The name of the resource group.
2217
+ # @param vm_name [String] The name of the virtual machine.
2218
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2219
+ # to the HTTP request.
2220
+ #
2221
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2222
+ #
2223
+ def begin_restart_async(resource_group_name, vm_name, custom_headers:nil)
2224
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2225
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2226
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2227
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2228
+
2229
+
2230
+ request_headers = {}
2231
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2232
+
2233
+ # Set Headers
2234
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2235
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2236
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'
2237
+
2238
+ request_url = @base_url || @client.base_url
2239
+
2240
+ options = {
2241
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2242
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2243
+ query_params: {'api-version' => @client.api_version},
2244
+ headers: request_headers.merge(custom_headers || {}),
2245
+ base_url: request_url
2246
+ }
2247
+ promise = @client.make_request_async(:post, path_template, options)
2248
+
2249
+ promise = promise.then do |result|
2250
+ http_response = result.response
2251
+ status_code = http_response.status
2252
+ response_content = http_response.body
2253
+ unless status_code == 200 || status_code == 202
2254
+ error_model = JSON.load(response_content)
2255
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2256
+ end
2257
+
2258
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2259
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2260
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2261
+
2262
+ result
2263
+ end
2264
+
2265
+ promise.execute
2266
+ end
2267
+
2268
+ #
2269
+ # The operation to start a virtual machine.
2270
+ #
2271
+ # @param resource_group_name [String] The name of the resource group.
2272
+ # @param vm_name [String] The name of the virtual machine.
2273
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2274
+ # will be added to the HTTP request.
2275
+ #
2276
+ #
2277
+ def begin_start(resource_group_name, vm_name, custom_headers:nil)
2278
+ response = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2279
+ nil
2280
+ end
2281
+
2282
+ #
2283
+ # The operation to start a virtual machine.
2284
+ #
2285
+ # @param resource_group_name [String] The name of the resource group.
2286
+ # @param vm_name [String] The name of the virtual machine.
2287
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2288
+ # will be added to the HTTP request.
2289
+ #
2290
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2291
+ #
2292
+ def begin_start_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2293
+ begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2294
+ end
2295
+
2296
+ #
2297
+ # The operation to start a virtual machine.
2298
+ #
2299
+ # @param resource_group_name [String] The name of the resource group.
2300
+ # @param vm_name [String] The name of the virtual machine.
2301
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2302
+ # to the HTTP request.
2303
+ #
2304
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2305
+ #
2306
+ def begin_start_async(resource_group_name, vm_name, custom_headers:nil)
2307
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2308
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2309
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2310
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2311
+
2312
+
2313
+ request_headers = {}
2314
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2315
+
2316
+ # Set Headers
2317
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2318
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2319
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'
2320
+
2321
+ request_url = @base_url || @client.base_url
2322
+
2323
+ options = {
2324
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2325
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2326
+ query_params: {'api-version' => @client.api_version},
2327
+ headers: request_headers.merge(custom_headers || {}),
2328
+ base_url: request_url
2329
+ }
2330
+ promise = @client.make_request_async(:post, path_template, options)
2331
+
2332
+ promise = promise.then do |result|
2333
+ http_response = result.response
2334
+ status_code = http_response.status
2335
+ response_content = http_response.body
2336
+ unless status_code == 200 || status_code == 202
2337
+ error_model = JSON.load(response_content)
2338
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2339
+ end
2340
+
2341
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2342
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2343
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2344
+
2345
+ result
2346
+ end
2347
+
2348
+ promise.execute
2349
+ end
2350
+
2351
+ #
2352
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
2353
+ # on.
2354
+ #
2355
+ # @param resource_group_name [String] The name of the resource group.
2356
+ # @param vm_name [String] The name of the virtual machine.
2357
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2358
+ # will be added to the HTTP request.
2359
+ #
2360
+ #
2361
+ def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
2362
+ response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2363
+ nil
2364
+ end
2365
+
2366
+ #
2367
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
2368
+ # on.
2369
+ #
2370
+ # @param resource_group_name [String] The name of the resource group.
2371
+ # @param vm_name [String] The name of the virtual machine.
2372
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2373
+ # will be added to the HTTP request.
2374
+ #
2375
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2376
+ #
2377
+ def begin_redeploy_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2378
+ begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2379
+ end
2380
+
2381
+ #
2382
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
2383
+ # on.
2384
+ #
2385
+ # @param resource_group_name [String] The name of the resource group.
2386
+ # @param vm_name [String] The name of the virtual machine.
2387
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2388
+ # to the HTTP request.
2389
+ #
2390
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2391
+ #
2392
+ def begin_redeploy_async(resource_group_name, vm_name, custom_headers:nil)
2393
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2394
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2395
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2396
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2397
+
2398
+
2399
+ request_headers = {}
2400
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2401
+
2402
+ # Set Headers
2403
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2404
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2405
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'
2406
+
2407
+ request_url = @base_url || @client.base_url
2408
+
2409
+ options = {
2410
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2411
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2412
+ query_params: {'api-version' => @client.api_version},
2413
+ headers: request_headers.merge(custom_headers || {}),
2414
+ base_url: request_url
2415
+ }
2416
+ promise = @client.make_request_async(:post, path_template, options)
2417
+
2418
+ promise = promise.then do |result|
2419
+ http_response = result.response
2420
+ status_code = http_response.status
2421
+ response_content = http_response.body
2422
+ unless status_code == 200 || status_code == 202
2423
+ error_model = JSON.load(response_content)
2424
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2425
+ end
2426
+
2427
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2428
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2429
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2430
+
2431
+ result
2432
+ end
2433
+
2434
+ promise.execute
2435
+ end
2436
+
2437
+ #
2438
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2439
+ # initial state.
2440
+ #
2441
+ # @param resource_group_name [String] The name of the resource group.
2442
+ # @param vm_name [String] The name of the virtual machine.
2443
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2444
+ # the Reimage Virtual Machine operation.
2445
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2446
+ # will be added to the HTTP request.
2447
+ #
2448
+ #
2449
+ def begin_reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2450
+ response = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2451
+ nil
2452
+ end
2453
+
2454
+ #
2455
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2456
+ # initial state.
2457
+ #
2458
+ # @param resource_group_name [String] The name of the resource group.
2459
+ # @param vm_name [String] The name of the virtual machine.
2460
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2461
+ # the Reimage Virtual Machine operation.
2462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2463
+ # will be added to the HTTP request.
2464
+ #
2465
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2466
+ #
2467
+ def begin_reimage_with_http_info(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2468
+ begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2469
+ end
2470
+
2471
+ #
2472
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2473
+ # initial state.
2474
+ #
2475
+ # @param resource_group_name [String] The name of the resource group.
2476
+ # @param vm_name [String] The name of the virtual machine.
2477
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2478
+ # the Reimage Virtual Machine operation.
2479
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2480
+ # to the HTTP request.
2481
+ #
2482
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2483
+ #
2484
+ def begin_reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2485
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2486
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2487
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2488
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2489
+
2490
+
2491
+ request_headers = {}
2492
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2493
+
2494
+ # Set Headers
2495
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2496
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2497
+
2498
+ # Serialize Request
2499
+ request_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineReimageParameters.mapper()
2500
+ request_content = @client.serialize(request_mapper, parameters)
2501
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2502
+
2503
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'
2504
+
2505
+ request_url = @base_url || @client.base_url
2506
+
2507
+ options = {
2508
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2509
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2510
+ query_params: {'api-version' => @client.api_version},
2511
+ body: request_content,
2512
+ headers: request_headers.merge(custom_headers || {}),
2513
+ base_url: request_url
2514
+ }
2515
+ promise = @client.make_request_async(:post, path_template, options)
2516
+
2517
+ promise = promise.then do |result|
2518
+ http_response = result.response
2519
+ status_code = http_response.status
2520
+ response_content = http_response.body
2521
+ unless status_code == 200 || status_code == 202
2522
+ error_model = JSON.load(response_content)
2523
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2524
+ end
2525
+
2526
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2527
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2528
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2529
+
2530
+ result
2531
+ end
2532
+
2533
+ promise.execute
2534
+ end
2535
+
2536
+ #
2537
+ # Shuts down the virtual machine, moves it to an already updated node, and
2538
+ # powers it back on during the self-service phase of planned maintenance.
2539
+ #
2540
+ # @param resource_group_name [String] The name of the resource group.
2541
+ # @param vm_name [String] The name of the virtual machine.
2542
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2543
+ # will be added to the HTTP request.
2544
+ #
2545
+ #
2546
+ def begin_perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
2547
+ response = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2548
+ nil
2549
+ end
2550
+
2551
+ #
2552
+ # Shuts down the virtual machine, moves it to an already updated node, and
2553
+ # powers it back on during the self-service phase of planned maintenance.
2554
+ #
2555
+ # @param resource_group_name [String] The name of the resource group.
2556
+ # @param vm_name [String] The name of the virtual machine.
2557
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2558
+ # will be added to the HTTP request.
2559
+ #
2560
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2561
+ #
2562
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2563
+ begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2564
+ end
2565
+
2566
+ #
2567
+ # Shuts down the virtual machine, moves it to an already updated node, and
2568
+ # powers it back on during the self-service phase of planned maintenance.
2569
+ #
2570
+ # @param resource_group_name [String] The name of the resource group.
2571
+ # @param vm_name [String] The name of the virtual machine.
2572
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2573
+ # to the HTTP request.
2574
+ #
2575
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2576
+ #
2577
+ def begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
2578
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2579
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2580
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2581
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2582
+
2583
+
2584
+ request_headers = {}
2585
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2586
+
2587
+ # Set Headers
2588
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2589
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2590
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'
2591
+
2592
+ request_url = @base_url || @client.base_url
2593
+
2594
+ options = {
2595
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2596
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2597
+ query_params: {'api-version' => @client.api_version},
2598
+ headers: request_headers.merge(custom_headers || {}),
2599
+ base_url: request_url
2600
+ }
2601
+ promise = @client.make_request_async(:post, path_template, options)
2602
+
2603
+ promise = promise.then do |result|
2604
+ http_response = result.response
2605
+ status_code = http_response.status
2606
+ response_content = http_response.body
2607
+ unless status_code == 200 || status_code == 202
2608
+ error_model = JSON.load(response_content)
2609
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2610
+ end
2611
+
2612
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2613
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2614
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2615
+
2616
+ result
2617
+ end
2618
+
2619
+ promise.execute
2620
+ end
2621
+
2622
+ #
2623
+ # Run command on the VM.
2624
+ #
2625
+ # @param resource_group_name [String] The name of the resource group.
2626
+ # @param vm_name [String] The name of the virtual machine.
2627
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2628
+ # operation.
2629
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2630
+ # will be added to the HTTP request.
2631
+ #
2632
+ # @return [RunCommandResult] operation results.
2633
+ #
2634
+ def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
2635
+ response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2636
+ response.body unless response.nil?
2637
+ end
2638
+
2639
+ #
2640
+ # Run command on the VM.
2641
+ #
2642
+ # @param resource_group_name [String] The name of the resource group.
2643
+ # @param vm_name [String] The name of the virtual machine.
2644
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2645
+ # operation.
2646
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2647
+ # will be added to the HTTP request.
2648
+ #
2649
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2650
+ #
2651
+ def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
2652
+ begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2653
+ end
2654
+
2655
+ #
2656
+ # Run command on the VM.
2657
+ #
2658
+ # @param resource_group_name [String] The name of the resource group.
2659
+ # @param vm_name [String] The name of the virtual machine.
2660
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2661
+ # operation.
2662
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2663
+ # to the HTTP request.
2664
+ #
2665
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2666
+ #
2667
+ def begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
2668
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2669
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2670
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2671
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2672
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2673
+
2674
+
2675
+ request_headers = {}
2676
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2677
+
2678
+ # Set Headers
2679
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2680
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2681
+
2682
+ # Serialize Request
2683
+ request_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::RunCommandInput.mapper()
2684
+ request_content = @client.serialize(request_mapper, parameters)
2685
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2686
+
2687
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'
2688
+
2689
+ request_url = @base_url || @client.base_url
2690
+
2691
+ options = {
2692
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2693
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2694
+ query_params: {'api-version' => @client.api_version},
2695
+ body: request_content,
2696
+ headers: request_headers.merge(custom_headers || {}),
2697
+ base_url: request_url
2698
+ }
2699
+ promise = @client.make_request_async(:post, path_template, options)
2700
+
2701
+ promise = promise.then do |result|
2702
+ http_response = result.response
2703
+ status_code = http_response.status
2704
+ response_content = http_response.body
2705
+ unless status_code == 200 || status_code == 202
2706
+ error_model = JSON.load(response_content)
2707
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2708
+ end
2709
+
2710
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2711
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2712
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2713
+ # Deserialize Response
2714
+ if status_code == 200
2715
+ begin
2716
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2717
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::RunCommandResult.mapper()
2718
+ result.body = @client.deserialize(result_mapper, parsed_response)
2719
+ rescue Exception => e
2720
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2721
+ end
2722
+ end
2723
+
2724
+ result
2725
+ end
2726
+
2727
+ promise.execute
2728
+ end
2729
+
2730
+ #
2731
+ # Gets all the virtual machines under the specified subscription for the
2732
+ # specified location.
2733
+ #
2734
+ # @param next_page_link [String] The NextLink from the previous successful call
2735
+ # to List operation.
2736
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2737
+ # will be added to the HTTP request.
2738
+ #
2739
+ # @return [VirtualMachineListResult] operation results.
2740
+ #
2741
+ def list_by_location_next(next_page_link, custom_headers:nil)
2742
+ response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2743
+ response.body unless response.nil?
2744
+ end
2745
+
2746
+ #
2747
+ # Gets all the virtual machines under the specified subscription for the
2748
+ # specified location.
2749
+ #
2750
+ # @param next_page_link [String] The NextLink from the previous successful call
2751
+ # to List operation.
2752
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2753
+ # will be added to the HTTP request.
2754
+ #
2755
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2756
+ #
2757
+ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
2758
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2759
+ end
2760
+
2761
+ #
2762
+ # Gets all the virtual machines under the specified subscription for the
2763
+ # specified location.
2764
+ #
2765
+ # @param next_page_link [String] The NextLink from the previous successful call
2766
+ # to List operation.
2767
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2768
+ # to the HTTP request.
2769
+ #
2770
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2771
+ #
2772
+ def list_by_location_next_async(next_page_link, custom_headers:nil)
2773
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2774
+
2775
+
2776
+ request_headers = {}
2777
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2778
+
2779
+ # Set Headers
2780
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2781
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2782
+ path_template = '{nextLink}'
2783
+
2784
+ request_url = @base_url || @client.base_url
2785
+
2786
+ options = {
2787
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2788
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2789
+ headers: request_headers.merge(custom_headers || {}),
2790
+ base_url: request_url
2791
+ }
2792
+ promise = @client.make_request_async(:get, path_template, options)
2793
+
2794
+ promise = promise.then do |result|
2795
+ http_response = result.response
2796
+ status_code = http_response.status
2797
+ response_content = http_response.body
2798
+ unless status_code == 200
2799
+ error_model = JSON.load(response_content)
2800
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2801
+ end
2802
+
2803
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2804
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2805
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2806
+ # Deserialize Response
2807
+ if status_code == 200
2808
+ begin
2809
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2810
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineListResult.mapper()
2811
+ result.body = @client.deserialize(result_mapper, parsed_response)
2812
+ rescue Exception => e
2813
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2814
+ end
2815
+ end
2816
+
2817
+ result
2818
+ end
2819
+
2820
+ promise.execute
2821
+ end
2822
+
2823
+ #
2824
+ # Lists all of the virtual machines in the specified resource group. Use the
2825
+ # nextLink property in the response to get the next page of virtual machines.
2826
+ #
2827
+ # @param next_page_link [String] The NextLink from the previous successful call
2828
+ # to List operation.
2829
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2830
+ # will be added to the HTTP request.
2831
+ #
2832
+ # @return [VirtualMachineListResult] operation results.
2833
+ #
2834
+ def list_next(next_page_link, custom_headers:nil)
2835
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
2836
+ response.body unless response.nil?
2837
+ end
2838
+
2839
+ #
2840
+ # Lists all of the virtual machines in the specified resource group. Use the
2841
+ # nextLink property in the response to get the next page of virtual machines.
2842
+ #
2843
+ # @param next_page_link [String] The NextLink from the previous successful call
2844
+ # to List operation.
2845
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2846
+ # will be added to the HTTP request.
2847
+ #
2848
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2849
+ #
2850
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
2851
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
2852
+ end
2853
+
2854
+ #
2855
+ # Lists all of the virtual machines in the specified resource group. Use the
2856
+ # nextLink property in the response to get the next page of virtual machines.
2857
+ #
2858
+ # @param next_page_link [String] The NextLink from the previous successful call
2859
+ # to List operation.
2860
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2861
+ # to the HTTP request.
2862
+ #
2863
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2864
+ #
2865
+ def list_next_async(next_page_link, custom_headers:nil)
2866
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2867
+
2868
+
2869
+ request_headers = {}
2870
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2871
+
2872
+ # Set Headers
2873
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2874
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2875
+ path_template = '{nextLink}'
2876
+
2877
+ request_url = @base_url || @client.base_url
2878
+
2879
+ options = {
2880
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2881
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2882
+ headers: request_headers.merge(custom_headers || {}),
2883
+ base_url: request_url
2884
+ }
2885
+ promise = @client.make_request_async(:get, path_template, options)
2886
+
2887
+ promise = promise.then do |result|
2888
+ http_response = result.response
2889
+ status_code = http_response.status
2890
+ response_content = http_response.body
2891
+ unless status_code == 200
2892
+ error_model = JSON.load(response_content)
2893
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2894
+ end
2895
+
2896
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2897
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2898
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2899
+ # Deserialize Response
2900
+ if status_code == 200
2901
+ begin
2902
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2903
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineListResult.mapper()
2904
+ result.body = @client.deserialize(result_mapper, parsed_response)
2905
+ rescue Exception => e
2906
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2907
+ end
2908
+ end
2909
+
2910
+ result
2911
+ end
2912
+
2913
+ promise.execute
2914
+ end
2915
+
2916
+ #
2917
+ # Lists all of the virtual machines in the specified subscription. Use the
2918
+ # nextLink property in the response to get the next page of virtual machines.
2919
+ #
2920
+ # @param next_page_link [String] The NextLink from the previous successful call
2921
+ # to List operation.
2922
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2923
+ # will be added to the HTTP request.
2924
+ #
2925
+ # @return [VirtualMachineListResult] operation results.
2926
+ #
2927
+ def list_all_next(next_page_link, custom_headers:nil)
2928
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2929
+ response.body unless response.nil?
2930
+ end
2931
+
2932
+ #
2933
+ # Lists all of the virtual machines in the specified subscription. Use the
2934
+ # nextLink property in the response to get the next page of virtual machines.
2935
+ #
2936
+ # @param next_page_link [String] The NextLink from the previous successful call
2937
+ # to List operation.
2938
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2939
+ # will be added to the HTTP request.
2940
+ #
2941
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2942
+ #
2943
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
2944
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
2945
+ end
2946
+
2947
+ #
2948
+ # Lists all of the virtual machines in the specified subscription. Use the
2949
+ # nextLink property in the response to get the next page of virtual machines.
2950
+ #
2951
+ # @param next_page_link [String] The NextLink from the previous successful call
2952
+ # to List operation.
2953
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2954
+ # to the HTTP request.
2955
+ #
2956
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2957
+ #
2958
+ def list_all_next_async(next_page_link, custom_headers:nil)
2959
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2960
+
2961
+
2962
+ request_headers = {}
2963
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2964
+
2965
+ # Set Headers
2966
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2967
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2968
+ path_template = '{nextLink}'
2969
+
2970
+ request_url = @base_url || @client.base_url
2971
+
2972
+ options = {
2973
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2974
+ skip_encoding_path_params: {'nextLink' => next_page_link},
2975
+ headers: request_headers.merge(custom_headers || {}),
2976
+ base_url: request_url
2977
+ }
2978
+ promise = @client.make_request_async(:get, path_template, options)
2979
+
2980
+ promise = promise.then do |result|
2981
+ http_response = result.response
2982
+ status_code = http_response.status
2983
+ response_content = http_response.body
2984
+ unless status_code == 200
2985
+ error_model = JSON.load(response_content)
2986
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2987
+ end
2988
+
2989
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2990
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2991
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2992
+ # Deserialize Response
2993
+ if status_code == 200
2994
+ begin
2995
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2996
+ result_mapper = Azure::Compute::Mgmt::V2019_12_01::Models::VirtualMachineListResult.mapper()
2997
+ result.body = @client.deserialize(result_mapper, parsed_response)
2998
+ rescue Exception => e
2999
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3000
+ end
3001
+ end
3002
+
3003
+ result
3004
+ end
3005
+
3006
+ promise.execute
3007
+ end
3008
+
3009
+ #
3010
+ # Gets all the virtual machines under the specified subscription for the
3011
+ # specified location.
3012
+ #
3013
+ # @param location [String] The location for which virtual machines under the
3014
+ # subscription are queried.
3015
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3016
+ # will be added to the HTTP request.
3017
+ #
3018
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
3019
+ # response.
3020
+ #
3021
+ def list_by_location_as_lazy(location, custom_headers:nil)
3022
+ response = list_by_location_async(location, custom_headers:custom_headers).value!
3023
+ unless response.nil?
3024
+ page = response.body
3025
+ page.next_method = Proc.new do |next_page_link|
3026
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers)
3027
+ end
3028
+ page
3029
+ end
3030
+ end
3031
+
3032
+ #
3033
+ # Lists all of the virtual machines in the specified resource group. Use the
3034
+ # nextLink property in the response to get the next page of virtual machines.
3035
+ #
3036
+ # @param resource_group_name [String] The name of the resource group.
3037
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3038
+ # will be added to the HTTP request.
3039
+ #
3040
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
3041
+ # response.
3042
+ #
3043
+ def list_as_lazy(resource_group_name, custom_headers:nil)
3044
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
3045
+ unless response.nil?
3046
+ page = response.body
3047
+ page.next_method = Proc.new do |next_page_link|
3048
+ list_next_async(next_page_link, custom_headers:custom_headers)
3049
+ end
3050
+ page
3051
+ end
3052
+ end
3053
+
3054
+ #
3055
+ # Lists all of the virtual machines in the specified subscription. Use the
3056
+ # nextLink property in the response to get the next page of virtual machines.
3057
+ #
3058
+ # @param status_only [String] statusOnly=true enables fetching run time status
3059
+ # of all Virtual Machines in the subscription.
3060
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3061
+ # will be added to the HTTP request.
3062
+ #
3063
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
3064
+ # response.
3065
+ #
3066
+ def list_all_as_lazy(status_only:nil, custom_headers:nil)
3067
+ response = list_all_async(status_only:status_only, custom_headers:custom_headers).value!
3068
+ unless response.nil?
3069
+ page = response.body
3070
+ page.next_method = Proc.new do |next_page_link|
3071
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
3072
+ end
3073
+ page
3074
+ end
3075
+ end
3076
+
3077
+ end
3078
+ end