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::V2020_06_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::V2020_06_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,3302 @@
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::V2020_06_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::V2020_06_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::V2020_06_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::V2020_06_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::V2020_06_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 force_deletion [Boolean] Optional parameter to force delete virtual
267
+ # machines.(Feature in Preview)
268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
269
+ # will be added to the HTTP request.
270
+ #
271
+ def delete(resource_group_name, vm_name, force_deletion:nil, custom_headers:nil)
272
+ response = delete_async(resource_group_name, vm_name, force_deletion:force_deletion, custom_headers:custom_headers).value!
273
+ nil
274
+ end
275
+
276
+ #
277
+ # @param resource_group_name [String] The name of the resource group.
278
+ # @param vm_name [String] The name of the virtual machine.
279
+ # @param force_deletion [Boolean] Optional parameter to force delete virtual
280
+ # machines.(Feature in Preview)
281
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
282
+ # will be added to the HTTP request.
283
+ #
284
+ # @return [Concurrent::Promise] promise which provides async access to http
285
+ # response.
286
+ #
287
+ def delete_async(resource_group_name, vm_name, force_deletion:nil, custom_headers:nil)
288
+ # Send request
289
+ promise = begin_delete_async(resource_group_name, vm_name, force_deletion:force_deletion, custom_headers:custom_headers)
290
+
291
+ promise = promise.then do |response|
292
+ # Defining deserialization method.
293
+ deserialize_method = lambda do |parsed_response|
294
+ end
295
+
296
+ # Waiting for response.
297
+ @client.get_long_running_operation_result(response, deserialize_method)
298
+ end
299
+
300
+ promise
301
+ end
302
+
303
+ #
304
+ # Retrieves information about the model view or the instance view of a virtual
305
+ # machine.
306
+ #
307
+ # @param resource_group_name [String] The name of the resource group.
308
+ # @param vm_name [String] The name of the virtual machine.
309
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
310
+ # operation. Possible values include: 'instanceView'
311
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
312
+ # will be added to the HTTP request.
313
+ #
314
+ # @return [VirtualMachine] operation results.
315
+ #
316
+ def get(resource_group_name, vm_name, expand:nil, custom_headers:nil)
317
+ response = get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
318
+ response.body unless response.nil?
319
+ end
320
+
321
+ #
322
+ # Retrieves information about the model view or the instance view of a virtual
323
+ # machine.
324
+ #
325
+ # @param resource_group_name [String] The name of the resource group.
326
+ # @param vm_name [String] The name of the virtual machine.
327
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
328
+ # operation. Possible values include: 'instanceView'
329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
+ # will be added to the HTTP request.
331
+ #
332
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
333
+ #
334
+ def get_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil)
335
+ get_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
336
+ end
337
+
338
+ #
339
+ # Retrieves information about the model view or the instance view of a virtual
340
+ # machine.
341
+ #
342
+ # @param resource_group_name [String] The name of the resource group.
343
+ # @param vm_name [String] The name of the virtual machine.
344
+ # @param expand [InstanceViewTypes] The expand expression to apply on the
345
+ # operation. Possible values include: 'instanceView'
346
+ # @param [Hash{String => String}] A hash of custom headers that will be added
347
+ # to the HTTP request.
348
+ #
349
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
350
+ #
351
+ def get_async(resource_group_name, vm_name, expand:nil, custom_headers:nil)
352
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
353
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
354
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
355
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
356
+
357
+
358
+ request_headers = {}
359
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
360
+
361
+ # Set Headers
362
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
363
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
364
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
365
+
366
+ request_url = @base_url || @client.base_url
367
+
368
+ options = {
369
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
370
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
371
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
372
+ headers: request_headers.merge(custom_headers || {}),
373
+ base_url: request_url
374
+ }
375
+ promise = @client.make_request_async(:get, path_template, options)
376
+
377
+ promise = promise.then do |result|
378
+ http_response = result.response
379
+ status_code = http_response.status
380
+ response_content = http_response.body
381
+ unless status_code == 200
382
+ error_model = JSON.load(response_content)
383
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
384
+ end
385
+
386
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
387
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
388
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
389
+ # Deserialize Response
390
+ if status_code == 200
391
+ begin
392
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
393
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachine.mapper()
394
+ result.body = @client.deserialize(result_mapper, parsed_response)
395
+ rescue Exception => e
396
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
397
+ end
398
+ end
399
+
400
+ result
401
+ end
402
+
403
+ promise.execute
404
+ end
405
+
406
+ #
407
+ # Retrieves information about the run-time state of a virtual machine.
408
+ #
409
+ # @param resource_group_name [String] The name of the resource group.
410
+ # @param vm_name [String] The name of the virtual machine.
411
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
412
+ # will be added to the HTTP request.
413
+ #
414
+ # @return [VirtualMachineInstanceView] operation results.
415
+ #
416
+ def instance_view(resource_group_name, vm_name, custom_headers:nil)
417
+ response = instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
418
+ response.body unless response.nil?
419
+ end
420
+
421
+ #
422
+ # Retrieves information about the run-time state of a virtual machine.
423
+ #
424
+ # @param resource_group_name [String] The name of the resource group.
425
+ # @param vm_name [String] The name of the virtual machine.
426
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
427
+ # will be added to the HTTP request.
428
+ #
429
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
430
+ #
431
+ def instance_view_with_http_info(resource_group_name, vm_name, custom_headers:nil)
432
+ instance_view_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
433
+ end
434
+
435
+ #
436
+ # Retrieves information about the run-time state of a virtual machine.
437
+ #
438
+ # @param resource_group_name [String] The name of the resource group.
439
+ # @param vm_name [String] The name of the virtual machine.
440
+ # @param [Hash{String => String}] A hash of custom headers that will be added
441
+ # to the HTTP request.
442
+ #
443
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
444
+ #
445
+ def instance_view_async(resource_group_name, vm_name, custom_headers:nil)
446
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
447
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
448
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
449
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
450
+
451
+
452
+ request_headers = {}
453
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
454
+
455
+ # Set Headers
456
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
457
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
458
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView'
459
+
460
+ request_url = @base_url || @client.base_url
461
+
462
+ options = {
463
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
464
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
465
+ query_params: {'api-version' => @client.api_version},
466
+ headers: request_headers.merge(custom_headers || {}),
467
+ base_url: request_url
468
+ }
469
+ promise = @client.make_request_async(:get, path_template, options)
470
+
471
+ promise = promise.then do |result|
472
+ http_response = result.response
473
+ status_code = http_response.status
474
+ response_content = http_response.body
475
+ unless status_code == 200
476
+ error_model = JSON.load(response_content)
477
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
478
+ end
479
+
480
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
481
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
482
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
483
+ # Deserialize Response
484
+ if status_code == 200
485
+ begin
486
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
487
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineInstanceView.mapper()
488
+ result.body = @client.deserialize(result_mapper, parsed_response)
489
+ rescue Exception => e
490
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
491
+ end
492
+ end
493
+
494
+ result
495
+ end
496
+
497
+ promise.execute
498
+ end
499
+
500
+ #
501
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
502
+ # machine must be stop-deallocated before invoking this operation.
503
+ #
504
+ # @param resource_group_name [String] The name of the resource group.
505
+ # @param vm_name [String] The name of the virtual machine.
506
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
507
+ # will be added to the HTTP request.
508
+ #
509
+ def convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
510
+ response = convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
511
+ nil
512
+ end
513
+
514
+ #
515
+ # @param resource_group_name [String] The name of the resource group.
516
+ # @param vm_name [String] The name of the virtual machine.
517
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
518
+ # will be added to the HTTP request.
519
+ #
520
+ # @return [Concurrent::Promise] promise which provides async access to http
521
+ # response.
522
+ #
523
+ def convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
524
+ # Send request
525
+ promise = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers)
526
+
527
+ promise = promise.then do |response|
528
+ # Defining deserialization method.
529
+ deserialize_method = lambda do |parsed_response|
530
+ end
531
+
532
+ # Waiting for response.
533
+ @client.get_long_running_operation_result(response, deserialize_method)
534
+ end
535
+
536
+ promise
537
+ end
538
+
539
+ #
540
+ # Shuts down the virtual machine and releases the compute resources. You are
541
+ # not billed for the compute resources that this virtual machine uses.
542
+ #
543
+ # @param resource_group_name [String] The name of the resource group.
544
+ # @param vm_name [String] The name of the virtual machine.
545
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
546
+ # will be added to the HTTP request.
547
+ #
548
+ def deallocate(resource_group_name, vm_name, custom_headers:nil)
549
+ response = deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
550
+ nil
551
+ end
552
+
553
+ #
554
+ # @param resource_group_name [String] The name of the resource group.
555
+ # @param vm_name [String] The name of the virtual machine.
556
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
557
+ # will be added to the HTTP request.
558
+ #
559
+ # @return [Concurrent::Promise] promise which provides async access to http
560
+ # response.
561
+ #
562
+ def deallocate_async(resource_group_name, vm_name, custom_headers:nil)
563
+ # Send request
564
+ promise = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers)
565
+
566
+ promise = promise.then do |response|
567
+ # Defining deserialization method.
568
+ deserialize_method = lambda do |parsed_response|
569
+ end
570
+
571
+ # Waiting for response.
572
+ @client.get_long_running_operation_result(response, deserialize_method)
573
+ end
574
+
575
+ promise
576
+ end
577
+
578
+ #
579
+ # Sets the OS state of the virtual machine to generalized. It is recommended to
580
+ # sysprep the virtual machine before performing this operation. <br>For
581
+ # Windows, please refer to [Create a managed image of a generalized VM in
582
+ # Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For
583
+ # Linux, please refer to [How to create an image of a virtual machine or
584
+ # VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
585
+ #
586
+ # @param resource_group_name [String] The name of the resource group.
587
+ # @param vm_name [String] The name of the virtual machine.
588
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
589
+ # will be added to the HTTP request.
590
+ #
591
+ #
592
+ def generalize(resource_group_name, vm_name, custom_headers:nil)
593
+ response = generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
594
+ nil
595
+ end
596
+
597
+ #
598
+ # Sets the OS state of the virtual machine to generalized. It is recommended to
599
+ # sysprep the virtual machine before performing this operation. <br>For
600
+ # Windows, please refer to [Create a managed image of a generalized VM in
601
+ # Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For
602
+ # Linux, please refer to [How to create an image of a virtual machine or
603
+ # VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
604
+ #
605
+ # @param resource_group_name [String] The name of the resource group.
606
+ # @param vm_name [String] The name of the virtual machine.
607
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
608
+ # will be added to the HTTP request.
609
+ #
610
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
611
+ #
612
+ def generalize_with_http_info(resource_group_name, vm_name, custom_headers:nil)
613
+ generalize_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
614
+ end
615
+
616
+ #
617
+ # Sets the OS state of the virtual machine to generalized. It is recommended to
618
+ # sysprep the virtual machine before performing this operation. <br>For
619
+ # Windows, please refer to [Create a managed image of a generalized VM in
620
+ # Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).<br>For
621
+ # Linux, please refer to [How to create an image of a virtual machine or
622
+ # VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
623
+ #
624
+ # @param resource_group_name [String] The name of the resource group.
625
+ # @param vm_name [String] The name of the virtual machine.
626
+ # @param [Hash{String => String}] A hash of custom headers that will be added
627
+ # to the HTTP request.
628
+ #
629
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
630
+ #
631
+ def generalize_async(resource_group_name, vm_name, custom_headers:nil)
632
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
633
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
634
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
635
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
636
+
637
+
638
+ request_headers = {}
639
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
640
+
641
+ # Set Headers
642
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
643
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
644
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize'
645
+
646
+ request_url = @base_url || @client.base_url
647
+
648
+ options = {
649
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
650
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
651
+ query_params: {'api-version' => @client.api_version},
652
+ headers: request_headers.merge(custom_headers || {}),
653
+ base_url: request_url
654
+ }
655
+ promise = @client.make_request_async(:post, path_template, options)
656
+
657
+ promise = promise.then do |result|
658
+ http_response = result.response
659
+ status_code = http_response.status
660
+ response_content = http_response.body
661
+ unless status_code == 200
662
+ error_model = JSON.load(response_content)
663
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
664
+ end
665
+
666
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
667
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
668
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
669
+
670
+ result
671
+ end
672
+
673
+ promise.execute
674
+ end
675
+
676
+ #
677
+ # Lists all of the virtual machines in the specified resource group. Use the
678
+ # nextLink property in the response to get the next page of virtual machines.
679
+ #
680
+ # @param resource_group_name [String] The name of the resource group.
681
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
682
+ # will be added to the HTTP request.
683
+ #
684
+ # @return [Array<VirtualMachine>] operation results.
685
+ #
686
+ def list(resource_group_name, custom_headers:nil)
687
+ first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers)
688
+ first_page.get_all_items
689
+ end
690
+
691
+ #
692
+ # Lists all of the virtual machines in the specified resource group. Use the
693
+ # nextLink property in the response to get the next page of virtual machines.
694
+ #
695
+ # @param resource_group_name [String] The name of the resource group.
696
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
697
+ # will be added to the HTTP request.
698
+ #
699
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
700
+ #
701
+ def list_with_http_info(resource_group_name, custom_headers:nil)
702
+ list_async(resource_group_name, custom_headers:custom_headers).value!
703
+ end
704
+
705
+ #
706
+ # Lists all of the virtual machines in the specified resource group. Use the
707
+ # nextLink property in the response to get the next page of virtual machines.
708
+ #
709
+ # @param resource_group_name [String] The name of the resource group.
710
+ # @param [Hash{String => String}] A hash of custom headers that will be added
711
+ # to the HTTP request.
712
+ #
713
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
714
+ #
715
+ def list_async(resource_group_name, custom_headers:nil)
716
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
717
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
718
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
719
+
720
+
721
+ request_headers = {}
722
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
723
+
724
+ # Set Headers
725
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
726
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
727
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines'
728
+
729
+ request_url = @base_url || @client.base_url
730
+
731
+ options = {
732
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
733
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
734
+ query_params: {'api-version' => @client.api_version},
735
+ headers: request_headers.merge(custom_headers || {}),
736
+ base_url: request_url
737
+ }
738
+ promise = @client.make_request_async(:get, path_template, options)
739
+
740
+ promise = promise.then do |result|
741
+ http_response = result.response
742
+ status_code = http_response.status
743
+ response_content = http_response.body
744
+ unless status_code == 200
745
+ error_model = JSON.load(response_content)
746
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
747
+ end
748
+
749
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
750
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
751
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
752
+ # Deserialize Response
753
+ if status_code == 200
754
+ begin
755
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
756
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineListResult.mapper()
757
+ result.body = @client.deserialize(result_mapper, parsed_response)
758
+ rescue Exception => e
759
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
760
+ end
761
+ end
762
+
763
+ result
764
+ end
765
+
766
+ promise.execute
767
+ end
768
+
769
+ #
770
+ # Lists all of the virtual machines in the specified subscription. Use the
771
+ # nextLink property in the response to get the next page of virtual machines.
772
+ #
773
+ # @param status_only [String] statusOnly=true enables fetching run time status
774
+ # of all Virtual Machines in the subscription.
775
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
776
+ # will be added to the HTTP request.
777
+ #
778
+ # @return [Array<VirtualMachine>] operation results.
779
+ #
780
+ def list_all(status_only:nil, custom_headers:nil)
781
+ first_page = list_all_as_lazy(status_only:status_only, custom_headers:custom_headers)
782
+ first_page.get_all_items
783
+ end
784
+
785
+ #
786
+ # Lists all of the virtual machines in the specified subscription. Use the
787
+ # nextLink property in the response to get the next page of virtual machines.
788
+ #
789
+ # @param status_only [String] statusOnly=true enables fetching run time status
790
+ # of all Virtual Machines in the subscription.
791
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
792
+ # will be added to the HTTP request.
793
+ #
794
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
795
+ #
796
+ def list_all_with_http_info(status_only:nil, custom_headers:nil)
797
+ list_all_async(status_only:status_only, custom_headers:custom_headers).value!
798
+ end
799
+
800
+ #
801
+ # Lists all of the virtual machines in the specified subscription. Use the
802
+ # nextLink property in the response to get the next page of virtual machines.
803
+ #
804
+ # @param status_only [String] statusOnly=true enables fetching run time status
805
+ # of all Virtual Machines in the subscription.
806
+ # @param [Hash{String => String}] A hash of custom headers that will be added
807
+ # to the HTTP request.
808
+ #
809
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
810
+ #
811
+ def list_all_async(status_only:nil, custom_headers:nil)
812
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
813
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
814
+
815
+
816
+ request_headers = {}
817
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
818
+
819
+ # Set Headers
820
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
821
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
822
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines'
823
+
824
+ request_url = @base_url || @client.base_url
825
+
826
+ options = {
827
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
828
+ path_params: {'subscriptionId' => @client.subscription_id},
829
+ query_params: {'api-version' => @client.api_version,'statusOnly' => status_only},
830
+ headers: request_headers.merge(custom_headers || {}),
831
+ base_url: request_url
832
+ }
833
+ promise = @client.make_request_async(:get, path_template, options)
834
+
835
+ promise = promise.then do |result|
836
+ http_response = result.response
837
+ status_code = http_response.status
838
+ response_content = http_response.body
839
+ unless status_code == 200
840
+ error_model = JSON.load(response_content)
841
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
842
+ end
843
+
844
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
845
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
846
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
847
+ # Deserialize Response
848
+ if status_code == 200
849
+ begin
850
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
851
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineListResult.mapper()
852
+ result.body = @client.deserialize(result_mapper, parsed_response)
853
+ rescue Exception => e
854
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
855
+ end
856
+ end
857
+
858
+ result
859
+ end
860
+
861
+ promise.execute
862
+ end
863
+
864
+ #
865
+ # Lists all available virtual machine sizes to which the specified virtual
866
+ # machine can be resized.
867
+ #
868
+ # @param resource_group_name [String] The name of the resource group.
869
+ # @param vm_name [String] The name of the virtual machine.
870
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
871
+ # will be added to the HTTP request.
872
+ #
873
+ # @return [VirtualMachineSizeListResult] operation results.
874
+ #
875
+ def list_available_sizes(resource_group_name, vm_name, custom_headers:nil)
876
+ response = list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
877
+ response.body unless response.nil?
878
+ end
879
+
880
+ #
881
+ # Lists all available virtual machine sizes to which the specified virtual
882
+ # machine can be resized.
883
+ #
884
+ # @param resource_group_name [String] The name of the resource group.
885
+ # @param vm_name [String] The name of the virtual machine.
886
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
887
+ # will be added to the HTTP request.
888
+ #
889
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
890
+ #
891
+ def list_available_sizes_with_http_info(resource_group_name, vm_name, custom_headers:nil)
892
+ list_available_sizes_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
893
+ end
894
+
895
+ #
896
+ # Lists all available virtual machine sizes to which the specified virtual
897
+ # machine can be resized.
898
+ #
899
+ # @param resource_group_name [String] The name of the resource group.
900
+ # @param vm_name [String] The name of the virtual machine.
901
+ # @param [Hash{String => String}] A hash of custom headers that will be added
902
+ # to the HTTP request.
903
+ #
904
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
905
+ #
906
+ def list_available_sizes_async(resource_group_name, vm_name, custom_headers:nil)
907
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
908
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
909
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
910
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
911
+
912
+
913
+ request_headers = {}
914
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
915
+
916
+ # Set Headers
917
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
918
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
919
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes'
920
+
921
+ request_url = @base_url || @client.base_url
922
+
923
+ options = {
924
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
925
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
926
+ query_params: {'api-version' => @client.api_version},
927
+ headers: request_headers.merge(custom_headers || {}),
928
+ base_url: request_url
929
+ }
930
+ promise = @client.make_request_async(:get, path_template, options)
931
+
932
+ promise = promise.then do |result|
933
+ http_response = result.response
934
+ status_code = http_response.status
935
+ response_content = http_response.body
936
+ unless status_code == 200
937
+ error_model = JSON.load(response_content)
938
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
939
+ end
940
+
941
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
942
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
943
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
944
+ # Deserialize Response
945
+ if status_code == 200
946
+ begin
947
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
948
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineSizeListResult.mapper()
949
+ result.body = @client.deserialize(result_mapper, parsed_response)
950
+ rescue Exception => e
951
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
952
+ end
953
+ end
954
+
955
+ result
956
+ end
957
+
958
+ promise.execute
959
+ end
960
+
961
+ #
962
+ # The operation to power off (stop) a virtual machine. The virtual machine can
963
+ # be restarted with the same provisioned resources. You are still charged for
964
+ # this virtual machine.
965
+ #
966
+ # @param resource_group_name [String] The name of the resource group.
967
+ # @param vm_name [String] The name of the virtual machine.
968
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
969
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
970
+ # false indicates otherwise. Default value for this flag is false if not
971
+ # specified
972
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
973
+ # will be added to the HTTP request.
974
+ #
975
+ def power_off(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
976
+ response = power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
977
+ nil
978
+ end
979
+
980
+ #
981
+ # @param resource_group_name [String] The name of the resource group.
982
+ # @param vm_name [String] The name of the virtual machine.
983
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
984
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
985
+ # false indicates otherwise. Default value for this flag is false if not
986
+ # specified
987
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
988
+ # will be added to the HTTP request.
989
+ #
990
+ # @return [Concurrent::Promise] promise which provides async access to http
991
+ # response.
992
+ #
993
+ def power_off_async(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
994
+ # Send request
995
+ promise = begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers)
996
+
997
+ promise = promise.then do |response|
998
+ # Defining deserialization method.
999
+ deserialize_method = lambda do |parsed_response|
1000
+ end
1001
+
1002
+ # Waiting for response.
1003
+ @client.get_long_running_operation_result(response, deserialize_method)
1004
+ end
1005
+
1006
+ promise
1007
+ end
1008
+
1009
+ #
1010
+ # The operation to reapply a virtual machine's state.
1011
+ #
1012
+ # @param resource_group_name [String] The name of the resource group.
1013
+ # @param vm_name [String] The name of the virtual machine.
1014
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1015
+ # will be added to the HTTP request.
1016
+ #
1017
+ def reapply(resource_group_name, vm_name, custom_headers:nil)
1018
+ response = reapply_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1019
+ nil
1020
+ end
1021
+
1022
+ #
1023
+ # @param resource_group_name [String] The name of the resource group.
1024
+ # @param vm_name [String] The name of the virtual machine.
1025
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1026
+ # will be added to the HTTP request.
1027
+ #
1028
+ # @return [Concurrent::Promise] promise which provides async access to http
1029
+ # response.
1030
+ #
1031
+ def reapply_async(resource_group_name, vm_name, custom_headers:nil)
1032
+ # Send request
1033
+ promise = begin_reapply_async(resource_group_name, vm_name, custom_headers:custom_headers)
1034
+
1035
+ promise = promise.then do |response|
1036
+ # Defining deserialization method.
1037
+ deserialize_method = lambda do |parsed_response|
1038
+ end
1039
+
1040
+ # Waiting for response.
1041
+ @client.get_long_running_operation_result(response, deserialize_method)
1042
+ end
1043
+
1044
+ promise
1045
+ end
1046
+
1047
+ #
1048
+ # The operation to restart a virtual machine.
1049
+ #
1050
+ # @param resource_group_name [String] The name of the resource group.
1051
+ # @param vm_name [String] The name of the virtual machine.
1052
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1053
+ # will be added to the HTTP request.
1054
+ #
1055
+ def restart(resource_group_name, vm_name, custom_headers:nil)
1056
+ response = restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1057
+ nil
1058
+ end
1059
+
1060
+ #
1061
+ # @param resource_group_name [String] The name of the resource group.
1062
+ # @param vm_name [String] The name of the virtual machine.
1063
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1064
+ # will be added to the HTTP request.
1065
+ #
1066
+ # @return [Concurrent::Promise] promise which provides async access to http
1067
+ # response.
1068
+ #
1069
+ def restart_async(resource_group_name, vm_name, custom_headers:nil)
1070
+ # Send request
1071
+ promise = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers)
1072
+
1073
+ promise = promise.then do |response|
1074
+ # Defining deserialization method.
1075
+ deserialize_method = lambda do |parsed_response|
1076
+ end
1077
+
1078
+ # Waiting for response.
1079
+ @client.get_long_running_operation_result(response, deserialize_method)
1080
+ end
1081
+
1082
+ promise
1083
+ end
1084
+
1085
+ #
1086
+ # The operation to start a virtual machine.
1087
+ #
1088
+ # @param resource_group_name [String] The name of the resource group.
1089
+ # @param vm_name [String] The name of the virtual machine.
1090
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1091
+ # will be added to the HTTP request.
1092
+ #
1093
+ def start(resource_group_name, vm_name, custom_headers:nil)
1094
+ response = start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1095
+ nil
1096
+ end
1097
+
1098
+ #
1099
+ # @param resource_group_name [String] The name of the resource group.
1100
+ # @param vm_name [String] The name of the virtual machine.
1101
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1102
+ # will be added to the HTTP request.
1103
+ #
1104
+ # @return [Concurrent::Promise] promise which provides async access to http
1105
+ # response.
1106
+ #
1107
+ def start_async(resource_group_name, vm_name, custom_headers:nil)
1108
+ # Send request
1109
+ promise = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers)
1110
+
1111
+ promise = promise.then do |response|
1112
+ # Defining deserialization method.
1113
+ deserialize_method = lambda do |parsed_response|
1114
+ end
1115
+
1116
+ # Waiting for response.
1117
+ @client.get_long_running_operation_result(response, deserialize_method)
1118
+ end
1119
+
1120
+ promise
1121
+ end
1122
+
1123
+ #
1124
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
1125
+ # on.
1126
+ #
1127
+ # @param resource_group_name [String] The name of the resource group.
1128
+ # @param vm_name [String] The name of the virtual machine.
1129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1130
+ # will be added to the HTTP request.
1131
+ #
1132
+ def redeploy(resource_group_name, vm_name, custom_headers:nil)
1133
+ response = redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1134
+ nil
1135
+ end
1136
+
1137
+ #
1138
+ # @param resource_group_name [String] The name of the resource group.
1139
+ # @param vm_name [String] The name of the virtual machine.
1140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1141
+ # will be added to the HTTP request.
1142
+ #
1143
+ # @return [Concurrent::Promise] promise which provides async access to http
1144
+ # response.
1145
+ #
1146
+ def redeploy_async(resource_group_name, vm_name, custom_headers:nil)
1147
+ # Send request
1148
+ promise = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers)
1149
+
1150
+ promise = promise.then do |response|
1151
+ # Defining deserialization method.
1152
+ deserialize_method = lambda do |parsed_response|
1153
+ end
1154
+
1155
+ # Waiting for response.
1156
+ @client.get_long_running_operation_result(response, deserialize_method)
1157
+ end
1158
+
1159
+ promise
1160
+ end
1161
+
1162
+ #
1163
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
1164
+ # initial state.
1165
+ #
1166
+ # @param resource_group_name [String] The name of the resource group.
1167
+ # @param vm_name [String] The name of the virtual machine.
1168
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1169
+ # the Reimage Virtual Machine operation.
1170
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1171
+ # will be added to the HTTP request.
1172
+ #
1173
+ def reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1174
+ response = reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
1175
+ nil
1176
+ end
1177
+
1178
+ #
1179
+ # @param resource_group_name [String] The name of the resource group.
1180
+ # @param vm_name [String] The name of the virtual machine.
1181
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
1182
+ # the Reimage Virtual Machine operation.
1183
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1184
+ # will be added to the HTTP request.
1185
+ #
1186
+ # @return [Concurrent::Promise] promise which provides async access to http
1187
+ # response.
1188
+ #
1189
+ def reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
1190
+ # Send request
1191
+ promise = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers)
1192
+
1193
+ promise = promise.then do |response|
1194
+ # Defining deserialization method.
1195
+ deserialize_method = lambda do |parsed_response|
1196
+ end
1197
+
1198
+ # Waiting for response.
1199
+ @client.get_long_running_operation_result(response, deserialize_method)
1200
+ end
1201
+
1202
+ promise
1203
+ end
1204
+
1205
+ #
1206
+ # The operation to retrieve SAS URIs for a virtual machine's boot diagnostic
1207
+ # logs.
1208
+ #
1209
+ # @param resource_group_name [String] The name of the resource group.
1210
+ # @param vm_name [String] The name of the virtual machine.
1211
+ # @param sas_uri_expiration_time_in_minutes [Integer] Expiration duration in
1212
+ # minutes for the SAS URIs with a value between 1 to 1440 minutes.
1213
+ # <br><br>NOTE: If not specified, SAS URIs will be generated with a default
1214
+ # expiration duration of 120 minutes.
1215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1216
+ # will be added to the HTTP request.
1217
+ #
1218
+ # @return [RetrieveBootDiagnosticsDataResult] operation results.
1219
+ #
1220
+ def retrieve_boot_diagnostics_data(resource_group_name, vm_name, sas_uri_expiration_time_in_minutes:nil, custom_headers:nil)
1221
+ response = retrieve_boot_diagnostics_data_async(resource_group_name, vm_name, sas_uri_expiration_time_in_minutes:sas_uri_expiration_time_in_minutes, custom_headers:custom_headers).value!
1222
+ response.body unless response.nil?
1223
+ end
1224
+
1225
+ #
1226
+ # The operation to retrieve SAS URIs for a virtual machine's boot diagnostic
1227
+ # logs.
1228
+ #
1229
+ # @param resource_group_name [String] The name of the resource group.
1230
+ # @param vm_name [String] The name of the virtual machine.
1231
+ # @param sas_uri_expiration_time_in_minutes [Integer] Expiration duration in
1232
+ # minutes for the SAS URIs with a value between 1 to 1440 minutes.
1233
+ # <br><br>NOTE: If not specified, SAS URIs will be generated with a default
1234
+ # expiration duration of 120 minutes.
1235
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1236
+ # will be added to the HTTP request.
1237
+ #
1238
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1239
+ #
1240
+ def retrieve_boot_diagnostics_data_with_http_info(resource_group_name, vm_name, sas_uri_expiration_time_in_minutes:nil, custom_headers:nil)
1241
+ retrieve_boot_diagnostics_data_async(resource_group_name, vm_name, sas_uri_expiration_time_in_minutes:sas_uri_expiration_time_in_minutes, custom_headers:custom_headers).value!
1242
+ end
1243
+
1244
+ #
1245
+ # The operation to retrieve SAS URIs for a virtual machine's boot diagnostic
1246
+ # logs.
1247
+ #
1248
+ # @param resource_group_name [String] The name of the resource group.
1249
+ # @param vm_name [String] The name of the virtual machine.
1250
+ # @param sas_uri_expiration_time_in_minutes [Integer] Expiration duration in
1251
+ # minutes for the SAS URIs with a value between 1 to 1440 minutes.
1252
+ # <br><br>NOTE: If not specified, SAS URIs will be generated with a default
1253
+ # expiration duration of 120 minutes.
1254
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1255
+ # to the HTTP request.
1256
+ #
1257
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1258
+ #
1259
+ def retrieve_boot_diagnostics_data_async(resource_group_name, vm_name, sas_uri_expiration_time_in_minutes:nil, custom_headers:nil)
1260
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1261
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1262
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1263
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1264
+
1265
+
1266
+ request_headers = {}
1267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1268
+
1269
+ # Set Headers
1270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1272
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData'
1273
+
1274
+ request_url = @base_url || @client.base_url
1275
+
1276
+ options = {
1277
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1278
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1279
+ query_params: {'sasUriExpirationTimeInMinutes' => sas_uri_expiration_time_in_minutes,'api-version' => @client.api_version},
1280
+ headers: request_headers.merge(custom_headers || {}),
1281
+ base_url: request_url
1282
+ }
1283
+ promise = @client.make_request_async(:post, path_template, options)
1284
+
1285
+ promise = promise.then do |result|
1286
+ http_response = result.response
1287
+ status_code = http_response.status
1288
+ response_content = http_response.body
1289
+ unless status_code == 200
1290
+ error_model = JSON.load(response_content)
1291
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1292
+ end
1293
+
1294
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1295
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1296
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1297
+ # Deserialize Response
1298
+ if status_code == 200
1299
+ begin
1300
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1301
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::RetrieveBootDiagnosticsDataResult.mapper()
1302
+ result.body = @client.deserialize(result_mapper, parsed_response)
1303
+ rescue Exception => e
1304
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1305
+ end
1306
+ end
1307
+
1308
+ result
1309
+ end
1310
+
1311
+ promise.execute
1312
+ end
1313
+
1314
+ #
1315
+ # The operation to perform maintenance on a virtual machine.
1316
+ #
1317
+ # @param resource_group_name [String] The name of the resource group.
1318
+ # @param vm_name [String] The name of the virtual machine.
1319
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1320
+ # will be added to the HTTP request.
1321
+ #
1322
+ def perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
1323
+ response = perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1324
+ nil
1325
+ end
1326
+
1327
+ #
1328
+ # @param resource_group_name [String] The name of the resource group.
1329
+ # @param vm_name [String] The name of the virtual machine.
1330
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1331
+ # will be added to the HTTP request.
1332
+ #
1333
+ # @return [Concurrent::Promise] promise which provides async access to http
1334
+ # response.
1335
+ #
1336
+ def perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
1337
+ # Send request
1338
+ promise = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers)
1339
+
1340
+ promise = promise.then do |response|
1341
+ # Defining deserialization method.
1342
+ deserialize_method = lambda do |parsed_response|
1343
+ end
1344
+
1345
+ # Waiting for response.
1346
+ @client.get_long_running_operation_result(response, deserialize_method)
1347
+ end
1348
+
1349
+ promise
1350
+ end
1351
+
1352
+ #
1353
+ # The operation to simulate the eviction of spot virtual machine.
1354
+ #
1355
+ # @param resource_group_name [String] The name of the resource group.
1356
+ # @param vm_name [String] The name of the virtual machine.
1357
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1358
+ # will be added to the HTTP request.
1359
+ #
1360
+ #
1361
+ def simulate_eviction(resource_group_name, vm_name, custom_headers:nil)
1362
+ response = simulate_eviction_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1363
+ nil
1364
+ end
1365
+
1366
+ #
1367
+ # The operation to simulate the eviction of spot virtual machine.
1368
+ #
1369
+ # @param resource_group_name [String] The name of the resource group.
1370
+ # @param vm_name [String] The name of the virtual machine.
1371
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1372
+ # will be added to the HTTP request.
1373
+ #
1374
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1375
+ #
1376
+ def simulate_eviction_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1377
+ simulate_eviction_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1378
+ end
1379
+
1380
+ #
1381
+ # The operation to simulate the eviction of spot virtual machine.
1382
+ #
1383
+ # @param resource_group_name [String] The name of the resource group.
1384
+ # @param vm_name [String] The name of the virtual machine.
1385
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1386
+ # to the HTTP request.
1387
+ #
1388
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1389
+ #
1390
+ def simulate_eviction_async(resource_group_name, vm_name, custom_headers:nil)
1391
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1392
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1393
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1394
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1395
+
1396
+
1397
+ request_headers = {}
1398
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1399
+
1400
+ # Set Headers
1401
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1402
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1403
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction'
1404
+
1405
+ request_url = @base_url || @client.base_url
1406
+
1407
+ options = {
1408
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1409
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1410
+ query_params: {'api-version' => @client.api_version},
1411
+ headers: request_headers.merge(custom_headers || {}),
1412
+ base_url: request_url
1413
+ }
1414
+ promise = @client.make_request_async(:post, path_template, options)
1415
+
1416
+ promise = promise.then do |result|
1417
+ http_response = result.response
1418
+ status_code = http_response.status
1419
+ response_content = http_response.body
1420
+ unless status_code == 204
1421
+ error_model = JSON.load(response_content)
1422
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1423
+ end
1424
+
1425
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1426
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1427
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1428
+
1429
+ result
1430
+ end
1431
+
1432
+ promise.execute
1433
+ end
1434
+
1435
+ #
1436
+ # Assess patches on the VM.
1437
+ #
1438
+ # @param resource_group_name [String] The name of the resource group.
1439
+ # @param vm_name [String] The name of the virtual machine.
1440
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1441
+ # will be added to the HTTP request.
1442
+ #
1443
+ # @return [VirtualMachineAssessPatchesResult] operation results.
1444
+ #
1445
+ def assess_patches(resource_group_name, vm_name, custom_headers:nil)
1446
+ response = assess_patches_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1447
+ response.body unless response.nil?
1448
+ end
1449
+
1450
+ #
1451
+ # @param resource_group_name [String] The name of the resource group.
1452
+ # @param vm_name [String] The name of the virtual machine.
1453
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1454
+ # will be added to the HTTP request.
1455
+ #
1456
+ # @return [Concurrent::Promise] promise which provides async access to http
1457
+ # response.
1458
+ #
1459
+ def assess_patches_async(resource_group_name, vm_name, custom_headers:nil)
1460
+ # Send request
1461
+ promise = begin_assess_patches_async(resource_group_name, vm_name, custom_headers:custom_headers)
1462
+
1463
+ promise = promise.then do |response|
1464
+ # Defining deserialization method.
1465
+ deserialize_method = lambda do |parsed_response|
1466
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineAssessPatchesResult.mapper()
1467
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1468
+ end
1469
+
1470
+ # Waiting for response.
1471
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1472
+ end
1473
+
1474
+ promise
1475
+ end
1476
+
1477
+ #
1478
+ # Run command on the VM.
1479
+ #
1480
+ # @param resource_group_name [String] The name of the resource group.
1481
+ # @param vm_name [String] The name of the virtual machine.
1482
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1483
+ # operation.
1484
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1485
+ # will be added to the HTTP request.
1486
+ #
1487
+ # @return [RunCommandResult] operation results.
1488
+ #
1489
+ def run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
1490
+ response = run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1491
+ response.body unless response.nil?
1492
+ end
1493
+
1494
+ #
1495
+ # @param resource_group_name [String] The name of the resource group.
1496
+ # @param vm_name [String] The name of the virtual machine.
1497
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
1498
+ # operation.
1499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1500
+ # will be added to the HTTP request.
1501
+ #
1502
+ # @return [Concurrent::Promise] promise which provides async access to http
1503
+ # response.
1504
+ #
1505
+ def run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1506
+ # Send request
1507
+ promise = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers)
1508
+
1509
+ promise = promise.then do |response|
1510
+ # Defining deserialization method.
1511
+ deserialize_method = lambda do |parsed_response|
1512
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::RunCommandResult.mapper()
1513
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
1514
+ end
1515
+
1516
+ # Waiting for response.
1517
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
1518
+ end
1519
+
1520
+ promise
1521
+ end
1522
+
1523
+ #
1524
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1525
+ # template that can be used to create similar VMs.
1526
+ #
1527
+ # @param resource_group_name [String] The name of the resource group.
1528
+ # @param vm_name [String] The name of the virtual machine.
1529
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1530
+ # the Capture Virtual Machine operation.
1531
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1532
+ # will be added to the HTTP request.
1533
+ #
1534
+ # @return [VirtualMachineCaptureResult] operation results.
1535
+ #
1536
+ def begin_capture(resource_group_name, vm_name, parameters, custom_headers:nil)
1537
+ response = begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1538
+ response.body unless response.nil?
1539
+ end
1540
+
1541
+ #
1542
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1543
+ # template that can be used to create similar VMs.
1544
+ #
1545
+ # @param resource_group_name [String] The name of the resource group.
1546
+ # @param vm_name [String] The name of the virtual machine.
1547
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1548
+ # the Capture Virtual Machine operation.
1549
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1550
+ # will be added to the HTTP request.
1551
+ #
1552
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1553
+ #
1554
+ def begin_capture_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1555
+ begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1556
+ end
1557
+
1558
+ #
1559
+ # Captures the VM by copying virtual hard disks of the VM and outputs a
1560
+ # template that can be used to create similar VMs.
1561
+ #
1562
+ # @param resource_group_name [String] The name of the resource group.
1563
+ # @param vm_name [String] The name of the virtual machine.
1564
+ # @param parameters [VirtualMachineCaptureParameters] Parameters supplied to
1565
+ # the Capture Virtual Machine operation.
1566
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1567
+ # to the HTTP request.
1568
+ #
1569
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1570
+ #
1571
+ def begin_capture_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1572
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1573
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1574
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1575
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1576
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1577
+
1578
+
1579
+ request_headers = {}
1580
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1581
+
1582
+ # Set Headers
1583
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1584
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1585
+
1586
+ # Serialize Request
1587
+ request_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineCaptureParameters.mapper()
1588
+ request_content = @client.serialize(request_mapper, parameters)
1589
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1590
+
1591
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture'
1592
+
1593
+ request_url = @base_url || @client.base_url
1594
+
1595
+ options = {
1596
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1597
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1598
+ query_params: {'api-version' => @client.api_version},
1599
+ body: request_content,
1600
+ headers: request_headers.merge(custom_headers || {}),
1601
+ base_url: request_url
1602
+ }
1603
+ promise = @client.make_request_async(:post, path_template, options)
1604
+
1605
+ promise = promise.then do |result|
1606
+ http_response = result.response
1607
+ status_code = http_response.status
1608
+ response_content = http_response.body
1609
+ unless status_code == 200 || status_code == 202
1610
+ error_model = JSON.load(response_content)
1611
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1612
+ end
1613
+
1614
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1615
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1616
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1617
+ # Deserialize Response
1618
+ if status_code == 200
1619
+ begin
1620
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1621
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineCaptureResult.mapper()
1622
+ result.body = @client.deserialize(result_mapper, parsed_response)
1623
+ rescue Exception => e
1624
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1625
+ end
1626
+ end
1627
+
1628
+ result
1629
+ end
1630
+
1631
+ promise.execute
1632
+ end
1633
+
1634
+ #
1635
+ # The operation to create or update a virtual machine. Please note some
1636
+ # properties can be set only during virtual machine creation.
1637
+ #
1638
+ # @param resource_group_name [String] The name of the resource group.
1639
+ # @param vm_name [String] The name of the virtual machine.
1640
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1641
+ # Machine operation.
1642
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1643
+ # will be added to the HTTP request.
1644
+ #
1645
+ # @return [VirtualMachine] operation results.
1646
+ #
1647
+ def begin_create_or_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1648
+ response = begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1649
+ response.body unless response.nil?
1650
+ end
1651
+
1652
+ #
1653
+ # The operation to create or update a virtual machine. Please note some
1654
+ # properties can be set only during virtual machine creation.
1655
+ #
1656
+ # @param resource_group_name [String] The name of the resource group.
1657
+ # @param vm_name [String] The name of the virtual machine.
1658
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1659
+ # Machine operation.
1660
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1661
+ # will be added to the HTTP request.
1662
+ #
1663
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1664
+ #
1665
+ def begin_create_or_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1666
+ begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1667
+ end
1668
+
1669
+ #
1670
+ # The operation to create or update a virtual machine. Please note some
1671
+ # properties can be set only during virtual machine creation.
1672
+ #
1673
+ # @param resource_group_name [String] The name of the resource group.
1674
+ # @param vm_name [String] The name of the virtual machine.
1675
+ # @param parameters [VirtualMachine] Parameters supplied to the Create Virtual
1676
+ # Machine operation.
1677
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1678
+ # to the HTTP request.
1679
+ #
1680
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1681
+ #
1682
+ def begin_create_or_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1683
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1684
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1685
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1686
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1687
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1688
+
1689
+
1690
+ request_headers = {}
1691
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1692
+
1693
+ # Set Headers
1694
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1695
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1696
+
1697
+ # Serialize Request
1698
+ request_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachine.mapper()
1699
+ request_content = @client.serialize(request_mapper, parameters)
1700
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1701
+
1702
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1703
+
1704
+ request_url = @base_url || @client.base_url
1705
+
1706
+ options = {
1707
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1708
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1709
+ query_params: {'api-version' => @client.api_version},
1710
+ body: request_content,
1711
+ headers: request_headers.merge(custom_headers || {}),
1712
+ base_url: request_url
1713
+ }
1714
+ promise = @client.make_request_async(:put, path_template, options)
1715
+
1716
+ promise = promise.then do |result|
1717
+ http_response = result.response
1718
+ status_code = http_response.status
1719
+ response_content = http_response.body
1720
+ unless status_code == 200 || status_code == 201
1721
+ error_model = JSON.load(response_content)
1722
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1723
+ end
1724
+
1725
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1726
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1727
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1728
+ # Deserialize Response
1729
+ if status_code == 200
1730
+ begin
1731
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1732
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachine.mapper()
1733
+ result.body = @client.deserialize(result_mapper, parsed_response)
1734
+ rescue Exception => e
1735
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1736
+ end
1737
+ end
1738
+ # Deserialize Response
1739
+ if status_code == 201
1740
+ begin
1741
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1742
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachine.mapper()
1743
+ result.body = @client.deserialize(result_mapper, parsed_response)
1744
+ rescue Exception => e
1745
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1746
+ end
1747
+ end
1748
+
1749
+ result
1750
+ end
1751
+
1752
+ promise.execute
1753
+ end
1754
+
1755
+ #
1756
+ # The operation to update a virtual machine.
1757
+ #
1758
+ # @param resource_group_name [String] The name of the resource group.
1759
+ # @param vm_name [String] The name of the virtual machine.
1760
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1761
+ # Virtual Machine operation.
1762
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1763
+ # will be added to the HTTP request.
1764
+ #
1765
+ # @return [VirtualMachine] operation results.
1766
+ #
1767
+ def begin_update(resource_group_name, vm_name, parameters, custom_headers:nil)
1768
+ response = begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1769
+ response.body unless response.nil?
1770
+ end
1771
+
1772
+ #
1773
+ # The operation to update a virtual machine.
1774
+ #
1775
+ # @param resource_group_name [String] The name of the resource group.
1776
+ # @param vm_name [String] The name of the virtual machine.
1777
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1778
+ # Virtual Machine operation.
1779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1780
+ # will be added to the HTTP request.
1781
+ #
1782
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1783
+ #
1784
+ def begin_update_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
1785
+ begin_update_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
1786
+ end
1787
+
1788
+ #
1789
+ # The operation to update a virtual machine.
1790
+ #
1791
+ # @param resource_group_name [String] The name of the resource group.
1792
+ # @param vm_name [String] The name of the virtual machine.
1793
+ # @param parameters [VirtualMachineUpdate] Parameters supplied to the Update
1794
+ # Virtual Machine operation.
1795
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1796
+ # to the HTTP request.
1797
+ #
1798
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1799
+ #
1800
+ def begin_update_async(resource_group_name, vm_name, parameters, custom_headers:nil)
1801
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1802
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1803
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1804
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1805
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1806
+
1807
+
1808
+ request_headers = {}
1809
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1810
+
1811
+ # Set Headers
1812
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1813
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1814
+
1815
+ # Serialize Request
1816
+ request_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineUpdate.mapper()
1817
+ request_content = @client.serialize(request_mapper, parameters)
1818
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1819
+
1820
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1821
+
1822
+ request_url = @base_url || @client.base_url
1823
+
1824
+ options = {
1825
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1826
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1827
+ query_params: {'api-version' => @client.api_version},
1828
+ body: request_content,
1829
+ headers: request_headers.merge(custom_headers || {}),
1830
+ base_url: request_url
1831
+ }
1832
+ promise = @client.make_request_async(:patch, path_template, options)
1833
+
1834
+ promise = promise.then do |result|
1835
+ http_response = result.response
1836
+ status_code = http_response.status
1837
+ response_content = http_response.body
1838
+ unless status_code == 200 || status_code == 201
1839
+ error_model = JSON.load(response_content)
1840
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1841
+ end
1842
+
1843
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1844
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1845
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1846
+ # Deserialize Response
1847
+ if status_code == 200
1848
+ begin
1849
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1850
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachine.mapper()
1851
+ result.body = @client.deserialize(result_mapper, parsed_response)
1852
+ rescue Exception => e
1853
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1854
+ end
1855
+ end
1856
+ # Deserialize Response
1857
+ if status_code == 201
1858
+ begin
1859
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1860
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachine.mapper()
1861
+ result.body = @client.deserialize(result_mapper, parsed_response)
1862
+ rescue Exception => e
1863
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1864
+ end
1865
+ end
1866
+
1867
+ result
1868
+ end
1869
+
1870
+ promise.execute
1871
+ end
1872
+
1873
+ #
1874
+ # The operation to delete a virtual machine.
1875
+ #
1876
+ # @param resource_group_name [String] The name of the resource group.
1877
+ # @param vm_name [String] The name of the virtual machine.
1878
+ # @param force_deletion [Boolean] Optional parameter to force delete virtual
1879
+ # machines.(Feature in Preview)
1880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1881
+ # will be added to the HTTP request.
1882
+ #
1883
+ #
1884
+ def begin_delete(resource_group_name, vm_name, force_deletion:nil, custom_headers:nil)
1885
+ response = begin_delete_async(resource_group_name, vm_name, force_deletion:force_deletion, custom_headers:custom_headers).value!
1886
+ nil
1887
+ end
1888
+
1889
+ #
1890
+ # The operation to delete a virtual machine.
1891
+ #
1892
+ # @param resource_group_name [String] The name of the resource group.
1893
+ # @param vm_name [String] The name of the virtual machine.
1894
+ # @param force_deletion [Boolean] Optional parameter to force delete virtual
1895
+ # machines.(Feature in Preview)
1896
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1897
+ # will be added to the HTTP request.
1898
+ #
1899
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1900
+ #
1901
+ def begin_delete_with_http_info(resource_group_name, vm_name, force_deletion:nil, custom_headers:nil)
1902
+ begin_delete_async(resource_group_name, vm_name, force_deletion:force_deletion, custom_headers:custom_headers).value!
1903
+ end
1904
+
1905
+ #
1906
+ # The operation to delete a virtual machine.
1907
+ #
1908
+ # @param resource_group_name [String] The name of the resource group.
1909
+ # @param vm_name [String] The name of the virtual machine.
1910
+ # @param force_deletion [Boolean] Optional parameter to force delete virtual
1911
+ # machines.(Feature in Preview)
1912
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1913
+ # to the HTTP request.
1914
+ #
1915
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1916
+ #
1917
+ def begin_delete_async(resource_group_name, vm_name, force_deletion:nil, custom_headers:nil)
1918
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1919
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
1920
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1921
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1922
+
1923
+
1924
+ request_headers = {}
1925
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1926
+
1927
+ # Set Headers
1928
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1929
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1930
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}'
1931
+
1932
+ request_url = @base_url || @client.base_url
1933
+
1934
+ options = {
1935
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1936
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
1937
+ query_params: {'forceDeletion' => force_deletion,'api-version' => @client.api_version},
1938
+ headers: request_headers.merge(custom_headers || {}),
1939
+ base_url: request_url
1940
+ }
1941
+ promise = @client.make_request_async(:delete, path_template, options)
1942
+
1943
+ promise = promise.then do |result|
1944
+ http_response = result.response
1945
+ status_code = http_response.status
1946
+ response_content = http_response.body
1947
+ unless status_code == 200 || status_code == 202 || status_code == 204
1948
+ error_model = JSON.load(response_content)
1949
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1950
+ end
1951
+
1952
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1953
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1954
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1955
+
1956
+ result
1957
+ end
1958
+
1959
+ promise.execute
1960
+ end
1961
+
1962
+ #
1963
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1964
+ # machine must be stop-deallocated before invoking this operation.
1965
+ #
1966
+ # @param resource_group_name [String] The name of the resource group.
1967
+ # @param vm_name [String] The name of the virtual machine.
1968
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1969
+ # will be added to the HTTP request.
1970
+ #
1971
+ #
1972
+ def begin_convert_to_managed_disks(resource_group_name, vm_name, custom_headers:nil)
1973
+ response = begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1974
+ nil
1975
+ end
1976
+
1977
+ #
1978
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1979
+ # machine must be stop-deallocated before invoking this operation.
1980
+ #
1981
+ # @param resource_group_name [String] The name of the resource group.
1982
+ # @param vm_name [String] The name of the virtual machine.
1983
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1984
+ # will be added to the HTTP request.
1985
+ #
1986
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1987
+ #
1988
+ def begin_convert_to_managed_disks_with_http_info(resource_group_name, vm_name, custom_headers:nil)
1989
+ begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
1990
+ end
1991
+
1992
+ #
1993
+ # Converts virtual machine disks from blob-based to managed disks. Virtual
1994
+ # machine must be stop-deallocated before invoking this operation.
1995
+ #
1996
+ # @param resource_group_name [String] The name of the resource group.
1997
+ # @param vm_name [String] The name of the virtual machine.
1998
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1999
+ # to the HTTP request.
2000
+ #
2001
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2002
+ #
2003
+ def begin_convert_to_managed_disks_async(resource_group_name, vm_name, custom_headers:nil)
2004
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2005
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2006
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2007
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2008
+
2009
+
2010
+ request_headers = {}
2011
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2012
+
2013
+ # Set Headers
2014
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2015
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2016
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks'
2017
+
2018
+ request_url = @base_url || @client.base_url
2019
+
2020
+ options = {
2021
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2022
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2023
+ query_params: {'api-version' => @client.api_version},
2024
+ headers: request_headers.merge(custom_headers || {}),
2025
+ base_url: request_url
2026
+ }
2027
+ promise = @client.make_request_async(:post, path_template, options)
2028
+
2029
+ promise = promise.then do |result|
2030
+ http_response = result.response
2031
+ status_code = http_response.status
2032
+ response_content = http_response.body
2033
+ unless status_code == 200 || status_code == 202
2034
+ error_model = JSON.load(response_content)
2035
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2036
+ end
2037
+
2038
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2039
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2040
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2041
+
2042
+ result
2043
+ end
2044
+
2045
+ promise.execute
2046
+ end
2047
+
2048
+ #
2049
+ # Shuts down the virtual machine and releases the compute resources. You are
2050
+ # not billed for the compute resources that this virtual machine uses.
2051
+ #
2052
+ # @param resource_group_name [String] The name of the resource group.
2053
+ # @param vm_name [String] The name of the virtual machine.
2054
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2055
+ # will be added to the HTTP request.
2056
+ #
2057
+ #
2058
+ def begin_deallocate(resource_group_name, vm_name, custom_headers:nil)
2059
+ response = begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2060
+ nil
2061
+ end
2062
+
2063
+ #
2064
+ # Shuts down the virtual machine and releases the compute resources. You are
2065
+ # not billed for the compute resources that this virtual machine uses.
2066
+ #
2067
+ # @param resource_group_name [String] The name of the resource group.
2068
+ # @param vm_name [String] The name of the virtual machine.
2069
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2070
+ # will be added to the HTTP request.
2071
+ #
2072
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2073
+ #
2074
+ def begin_deallocate_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2075
+ begin_deallocate_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2076
+ end
2077
+
2078
+ #
2079
+ # Shuts down the virtual machine and releases the compute resources. You are
2080
+ # not billed for the compute resources that this virtual machine uses.
2081
+ #
2082
+ # @param resource_group_name [String] The name of the resource group.
2083
+ # @param vm_name [String] The name of the virtual machine.
2084
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2085
+ # to the HTTP request.
2086
+ #
2087
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2088
+ #
2089
+ def begin_deallocate_async(resource_group_name, vm_name, custom_headers:nil)
2090
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2091
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2092
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2093
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2094
+
2095
+
2096
+ request_headers = {}
2097
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2098
+
2099
+ # Set Headers
2100
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2101
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2102
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate'
2103
+
2104
+ request_url = @base_url || @client.base_url
2105
+
2106
+ options = {
2107
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2108
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2109
+ query_params: {'api-version' => @client.api_version},
2110
+ headers: request_headers.merge(custom_headers || {}),
2111
+ base_url: request_url
2112
+ }
2113
+ promise = @client.make_request_async(:post, path_template, options)
2114
+
2115
+ promise = promise.then do |result|
2116
+ http_response = result.response
2117
+ status_code = http_response.status
2118
+ response_content = http_response.body
2119
+ unless status_code == 200 || status_code == 202
2120
+ error_model = JSON.load(response_content)
2121
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2122
+ end
2123
+
2124
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2125
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2126
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2127
+
2128
+ result
2129
+ end
2130
+
2131
+ promise.execute
2132
+ end
2133
+
2134
+ #
2135
+ # The operation to power off (stop) a virtual machine. The virtual machine can
2136
+ # be restarted with the same provisioned resources. You are still charged for
2137
+ # this virtual machine.
2138
+ #
2139
+ # @param resource_group_name [String] The name of the resource group.
2140
+ # @param vm_name [String] The name of the virtual machine.
2141
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
2142
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
2143
+ # false indicates otherwise. Default value for this flag is false if not
2144
+ # specified
2145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2146
+ # will be added to the HTTP request.
2147
+ #
2148
+ #
2149
+ def begin_power_off(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
2150
+ response = begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
2151
+ nil
2152
+ end
2153
+
2154
+ #
2155
+ # The operation to power off (stop) a virtual machine. The virtual machine can
2156
+ # be restarted with the same provisioned resources. You are still charged for
2157
+ # this virtual machine.
2158
+ #
2159
+ # @param resource_group_name [String] The name of the resource group.
2160
+ # @param vm_name [String] The name of the virtual machine.
2161
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
2162
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
2163
+ # false indicates otherwise. Default value for this flag is false if not
2164
+ # specified
2165
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2166
+ # will be added to the HTTP request.
2167
+ #
2168
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2169
+ #
2170
+ def begin_power_off_with_http_info(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
2171
+ begin_power_off_async(resource_group_name, vm_name, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value!
2172
+ end
2173
+
2174
+ #
2175
+ # The operation to power off (stop) a virtual machine. The virtual machine can
2176
+ # be restarted with the same provisioned resources. You are still charged for
2177
+ # this virtual machine.
2178
+ #
2179
+ # @param resource_group_name [String] The name of the resource group.
2180
+ # @param vm_name [String] The name of the virtual machine.
2181
+ # @param skip_shutdown [Boolean] The parameter to request non-graceful VM
2182
+ # shutdown. True value for this flag indicates non-graceful shutdown whereas
2183
+ # false indicates otherwise. Default value for this flag is false if not
2184
+ # specified
2185
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2186
+ # to the HTTP request.
2187
+ #
2188
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2189
+ #
2190
+ def begin_power_off_async(resource_group_name, vm_name, skip_shutdown:false, custom_headers:nil)
2191
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2192
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2193
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2194
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2195
+
2196
+
2197
+ request_headers = {}
2198
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2199
+
2200
+ # Set Headers
2201
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2202
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2203
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff'
2204
+
2205
+ request_url = @base_url || @client.base_url
2206
+
2207
+ options = {
2208
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2209
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2210
+ query_params: {'skipShutdown' => skip_shutdown,'api-version' => @client.api_version},
2211
+ headers: request_headers.merge(custom_headers || {}),
2212
+ base_url: request_url
2213
+ }
2214
+ promise = @client.make_request_async(:post, path_template, options)
2215
+
2216
+ promise = promise.then do |result|
2217
+ http_response = result.response
2218
+ status_code = http_response.status
2219
+ response_content = http_response.body
2220
+ unless status_code == 200 || status_code == 202
2221
+ error_model = JSON.load(response_content)
2222
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2223
+ end
2224
+
2225
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2226
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2227
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2228
+
2229
+ result
2230
+ end
2231
+
2232
+ promise.execute
2233
+ end
2234
+
2235
+ #
2236
+ # The operation to reapply a virtual machine's state.
2237
+ #
2238
+ # @param resource_group_name [String] The name of the resource group.
2239
+ # @param vm_name [String] The name of the virtual machine.
2240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2241
+ # will be added to the HTTP request.
2242
+ #
2243
+ #
2244
+ def begin_reapply(resource_group_name, vm_name, custom_headers:nil)
2245
+ response = begin_reapply_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2246
+ nil
2247
+ end
2248
+
2249
+ #
2250
+ # The operation to reapply a virtual machine's state.
2251
+ #
2252
+ # @param resource_group_name [String] The name of the resource group.
2253
+ # @param vm_name [String] The name of the virtual machine.
2254
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2255
+ # will be added to the HTTP request.
2256
+ #
2257
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2258
+ #
2259
+ def begin_reapply_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2260
+ begin_reapply_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2261
+ end
2262
+
2263
+ #
2264
+ # The operation to reapply a virtual machine's state.
2265
+ #
2266
+ # @param resource_group_name [String] The name of the resource group.
2267
+ # @param vm_name [String] The name of the virtual machine.
2268
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2269
+ # to the HTTP request.
2270
+ #
2271
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2272
+ #
2273
+ def begin_reapply_async(resource_group_name, vm_name, custom_headers:nil)
2274
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2275
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2276
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2277
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2278
+
2279
+
2280
+ request_headers = {}
2281
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2282
+
2283
+ # Set Headers
2284
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2285
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2286
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply'
2287
+
2288
+ request_url = @base_url || @client.base_url
2289
+
2290
+ options = {
2291
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2292
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2293
+ query_params: {'api-version' => @client.api_version},
2294
+ headers: request_headers.merge(custom_headers || {}),
2295
+ base_url: request_url
2296
+ }
2297
+ promise = @client.make_request_async(:post, path_template, options)
2298
+
2299
+ promise = promise.then do |result|
2300
+ http_response = result.response
2301
+ status_code = http_response.status
2302
+ response_content = http_response.body
2303
+ unless status_code == 200 || status_code == 202
2304
+ error_model = JSON.load(response_content)
2305
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2306
+ end
2307
+
2308
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2309
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2310
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2311
+
2312
+ result
2313
+ end
2314
+
2315
+ promise.execute
2316
+ end
2317
+
2318
+ #
2319
+ # The operation to restart a virtual machine.
2320
+ #
2321
+ # @param resource_group_name [String] The name of the resource group.
2322
+ # @param vm_name [String] The name of the virtual machine.
2323
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2324
+ # will be added to the HTTP request.
2325
+ #
2326
+ #
2327
+ def begin_restart(resource_group_name, vm_name, custom_headers:nil)
2328
+ response = begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2329
+ nil
2330
+ end
2331
+
2332
+ #
2333
+ # The operation to restart a virtual machine.
2334
+ #
2335
+ # @param resource_group_name [String] The name of the resource group.
2336
+ # @param vm_name [String] The name of the virtual machine.
2337
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2338
+ # will be added to the HTTP request.
2339
+ #
2340
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2341
+ #
2342
+ def begin_restart_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2343
+ begin_restart_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2344
+ end
2345
+
2346
+ #
2347
+ # The operation to restart a virtual machine.
2348
+ #
2349
+ # @param resource_group_name [String] The name of the resource group.
2350
+ # @param vm_name [String] The name of the virtual machine.
2351
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2352
+ # to the HTTP request.
2353
+ #
2354
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2355
+ #
2356
+ def begin_restart_async(resource_group_name, vm_name, custom_headers:nil)
2357
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2358
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2359
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2360
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2361
+
2362
+
2363
+ request_headers = {}
2364
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2365
+
2366
+ # Set Headers
2367
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2368
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2369
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart'
2370
+
2371
+ request_url = @base_url || @client.base_url
2372
+
2373
+ options = {
2374
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2375
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2376
+ query_params: {'api-version' => @client.api_version},
2377
+ headers: request_headers.merge(custom_headers || {}),
2378
+ base_url: request_url
2379
+ }
2380
+ promise = @client.make_request_async(:post, path_template, options)
2381
+
2382
+ promise = promise.then do |result|
2383
+ http_response = result.response
2384
+ status_code = http_response.status
2385
+ response_content = http_response.body
2386
+ unless status_code == 200 || status_code == 202
2387
+ error_model = JSON.load(response_content)
2388
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2389
+ end
2390
+
2391
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2392
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2393
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2394
+
2395
+ result
2396
+ end
2397
+
2398
+ promise.execute
2399
+ end
2400
+
2401
+ #
2402
+ # The operation to start a virtual machine.
2403
+ #
2404
+ # @param resource_group_name [String] The name of the resource group.
2405
+ # @param vm_name [String] The name of the virtual machine.
2406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2407
+ # will be added to the HTTP request.
2408
+ #
2409
+ #
2410
+ def begin_start(resource_group_name, vm_name, custom_headers:nil)
2411
+ response = begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2412
+ nil
2413
+ end
2414
+
2415
+ #
2416
+ # The operation to start a virtual machine.
2417
+ #
2418
+ # @param resource_group_name [String] The name of the resource group.
2419
+ # @param vm_name [String] The name of the virtual machine.
2420
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2421
+ # will be added to the HTTP request.
2422
+ #
2423
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2424
+ #
2425
+ def begin_start_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2426
+ begin_start_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2427
+ end
2428
+
2429
+ #
2430
+ # The operation to start a virtual machine.
2431
+ #
2432
+ # @param resource_group_name [String] The name of the resource group.
2433
+ # @param vm_name [String] The name of the virtual machine.
2434
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2435
+ # to the HTTP request.
2436
+ #
2437
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2438
+ #
2439
+ def begin_start_async(resource_group_name, vm_name, custom_headers:nil)
2440
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2441
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2442
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2443
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2444
+
2445
+
2446
+ request_headers = {}
2447
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2448
+
2449
+ # Set Headers
2450
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2451
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2452
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start'
2453
+
2454
+ request_url = @base_url || @client.base_url
2455
+
2456
+ options = {
2457
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2458
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2459
+ query_params: {'api-version' => @client.api_version},
2460
+ headers: request_headers.merge(custom_headers || {}),
2461
+ base_url: request_url
2462
+ }
2463
+ promise = @client.make_request_async(:post, path_template, options)
2464
+
2465
+ promise = promise.then do |result|
2466
+ http_response = result.response
2467
+ status_code = http_response.status
2468
+ response_content = http_response.body
2469
+ unless status_code == 200 || status_code == 202
2470
+ error_model = JSON.load(response_content)
2471
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2472
+ end
2473
+
2474
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2475
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2476
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2477
+
2478
+ result
2479
+ end
2480
+
2481
+ promise.execute
2482
+ end
2483
+
2484
+ #
2485
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
2486
+ # on.
2487
+ #
2488
+ # @param resource_group_name [String] The name of the resource group.
2489
+ # @param vm_name [String] The name of the virtual machine.
2490
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2491
+ # will be added to the HTTP request.
2492
+ #
2493
+ #
2494
+ def begin_redeploy(resource_group_name, vm_name, custom_headers:nil)
2495
+ response = begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2496
+ nil
2497
+ end
2498
+
2499
+ #
2500
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
2501
+ # on.
2502
+ #
2503
+ # @param resource_group_name [String] The name of the resource group.
2504
+ # @param vm_name [String] The name of the virtual machine.
2505
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2506
+ # will be added to the HTTP request.
2507
+ #
2508
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2509
+ #
2510
+ def begin_redeploy_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2511
+ begin_redeploy_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2512
+ end
2513
+
2514
+ #
2515
+ # Shuts down the virtual machine, moves it to a new node, and powers it back
2516
+ # on.
2517
+ #
2518
+ # @param resource_group_name [String] The name of the resource group.
2519
+ # @param vm_name [String] The name of the virtual machine.
2520
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2521
+ # to the HTTP request.
2522
+ #
2523
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2524
+ #
2525
+ def begin_redeploy_async(resource_group_name, vm_name, custom_headers:nil)
2526
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2527
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2528
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2529
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2530
+
2531
+
2532
+ request_headers = {}
2533
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2534
+
2535
+ # Set Headers
2536
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2537
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2538
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'
2539
+
2540
+ request_url = @base_url || @client.base_url
2541
+
2542
+ options = {
2543
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2544
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2545
+ query_params: {'api-version' => @client.api_version},
2546
+ headers: request_headers.merge(custom_headers || {}),
2547
+ base_url: request_url
2548
+ }
2549
+ promise = @client.make_request_async(:post, path_template, options)
2550
+
2551
+ promise = promise.then do |result|
2552
+ http_response = result.response
2553
+ status_code = http_response.status
2554
+ response_content = http_response.body
2555
+ unless status_code == 200 || status_code == 202
2556
+ error_model = JSON.load(response_content)
2557
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2558
+ end
2559
+
2560
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2561
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2562
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2563
+
2564
+ result
2565
+ end
2566
+
2567
+ promise.execute
2568
+ end
2569
+
2570
+ #
2571
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2572
+ # initial state.
2573
+ #
2574
+ # @param resource_group_name [String] The name of the resource group.
2575
+ # @param vm_name [String] The name of the virtual machine.
2576
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2577
+ # the Reimage Virtual Machine operation.
2578
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2579
+ # will be added to the HTTP request.
2580
+ #
2581
+ #
2582
+ def begin_reimage(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2583
+ response = begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2584
+ nil
2585
+ end
2586
+
2587
+ #
2588
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2589
+ # initial state.
2590
+ #
2591
+ # @param resource_group_name [String] The name of the resource group.
2592
+ # @param vm_name [String] The name of the virtual machine.
2593
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2594
+ # the Reimage Virtual Machine operation.
2595
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2596
+ # will be added to the HTTP request.
2597
+ #
2598
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2599
+ #
2600
+ def begin_reimage_with_http_info(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2601
+ begin_reimage_async(resource_group_name, vm_name, parameters:parameters, custom_headers:custom_headers).value!
2602
+ end
2603
+
2604
+ #
2605
+ # Reimages the virtual machine which has an ephemeral OS disk back to its
2606
+ # initial state.
2607
+ #
2608
+ # @param resource_group_name [String] The name of the resource group.
2609
+ # @param vm_name [String] The name of the virtual machine.
2610
+ # @param parameters [VirtualMachineReimageParameters] Parameters supplied to
2611
+ # the Reimage Virtual Machine operation.
2612
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2613
+ # to the HTTP request.
2614
+ #
2615
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2616
+ #
2617
+ def begin_reimage_async(resource_group_name, vm_name, parameters:nil, custom_headers:nil)
2618
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2619
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2620
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2621
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2622
+
2623
+
2624
+ request_headers = {}
2625
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2626
+
2627
+ # Set Headers
2628
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2629
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2630
+
2631
+ # Serialize Request
2632
+ request_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineReimageParameters.mapper()
2633
+ request_content = @client.serialize(request_mapper, parameters)
2634
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2635
+
2636
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage'
2637
+
2638
+ request_url = @base_url || @client.base_url
2639
+
2640
+ options = {
2641
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2642
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2643
+ query_params: {'api-version' => @client.api_version},
2644
+ body: request_content,
2645
+ headers: request_headers.merge(custom_headers || {}),
2646
+ base_url: request_url
2647
+ }
2648
+ promise = @client.make_request_async(:post, path_template, options)
2649
+
2650
+ promise = promise.then do |result|
2651
+ http_response = result.response
2652
+ status_code = http_response.status
2653
+ response_content = http_response.body
2654
+ unless status_code == 200 || status_code == 202
2655
+ error_model = JSON.load(response_content)
2656
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2657
+ end
2658
+
2659
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2660
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2661
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2662
+
2663
+ result
2664
+ end
2665
+
2666
+ promise.execute
2667
+ end
2668
+
2669
+ #
2670
+ # The operation to perform maintenance on a virtual machine.
2671
+ #
2672
+ # @param resource_group_name [String] The name of the resource group.
2673
+ # @param vm_name [String] The name of the virtual machine.
2674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2675
+ # will be added to the HTTP request.
2676
+ #
2677
+ #
2678
+ def begin_perform_maintenance(resource_group_name, vm_name, custom_headers:nil)
2679
+ response = begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2680
+ nil
2681
+ end
2682
+
2683
+ #
2684
+ # The operation to perform maintenance on a virtual machine.
2685
+ #
2686
+ # @param resource_group_name [String] The name of the resource group.
2687
+ # @param vm_name [String] The name of the virtual machine.
2688
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2689
+ # will be added to the HTTP request.
2690
+ #
2691
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2692
+ #
2693
+ def begin_perform_maintenance_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2694
+ begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2695
+ end
2696
+
2697
+ #
2698
+ # The operation to perform maintenance on a virtual machine.
2699
+ #
2700
+ # @param resource_group_name [String] The name of the resource group.
2701
+ # @param vm_name [String] The name of the virtual machine.
2702
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2703
+ # to the HTTP request.
2704
+ #
2705
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2706
+ #
2707
+ def begin_perform_maintenance_async(resource_group_name, vm_name, custom_headers:nil)
2708
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2709
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2710
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2711
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2712
+
2713
+
2714
+ request_headers = {}
2715
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2716
+
2717
+ # Set Headers
2718
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2719
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2720
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'
2721
+
2722
+ request_url = @base_url || @client.base_url
2723
+
2724
+ options = {
2725
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2726
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2727
+ query_params: {'api-version' => @client.api_version},
2728
+ headers: request_headers.merge(custom_headers || {}),
2729
+ base_url: request_url
2730
+ }
2731
+ promise = @client.make_request_async(:post, path_template, options)
2732
+
2733
+ promise = promise.then do |result|
2734
+ http_response = result.response
2735
+ status_code = http_response.status
2736
+ response_content = http_response.body
2737
+ unless status_code == 200 || status_code == 202
2738
+ error_model = JSON.load(response_content)
2739
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2740
+ end
2741
+
2742
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2743
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2744
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2745
+
2746
+ result
2747
+ end
2748
+
2749
+ promise.execute
2750
+ end
2751
+
2752
+ #
2753
+ # Assess patches on the VM.
2754
+ #
2755
+ # @param resource_group_name [String] The name of the resource group.
2756
+ # @param vm_name [String] The name of the virtual machine.
2757
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2758
+ # will be added to the HTTP request.
2759
+ #
2760
+ # @return [VirtualMachineAssessPatchesResult] operation results.
2761
+ #
2762
+ def begin_assess_patches(resource_group_name, vm_name, custom_headers:nil)
2763
+ response = begin_assess_patches_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2764
+ response.body unless response.nil?
2765
+ end
2766
+
2767
+ #
2768
+ # Assess patches on the VM.
2769
+ #
2770
+ # @param resource_group_name [String] The name of the resource group.
2771
+ # @param vm_name [String] The name of the virtual machine.
2772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2773
+ # will be added to the HTTP request.
2774
+ #
2775
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2776
+ #
2777
+ def begin_assess_patches_with_http_info(resource_group_name, vm_name, custom_headers:nil)
2778
+ begin_assess_patches_async(resource_group_name, vm_name, custom_headers:custom_headers).value!
2779
+ end
2780
+
2781
+ #
2782
+ # Assess patches on the VM.
2783
+ #
2784
+ # @param resource_group_name [String] The name of the resource group.
2785
+ # @param vm_name [String] The name of the virtual machine.
2786
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2787
+ # to the HTTP request.
2788
+ #
2789
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2790
+ #
2791
+ def begin_assess_patches_async(resource_group_name, vm_name, custom_headers:nil)
2792
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2793
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2794
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2795
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2796
+
2797
+
2798
+ request_headers = {}
2799
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2800
+
2801
+ # Set Headers
2802
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2803
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2804
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches'
2805
+
2806
+ request_url = @base_url || @client.base_url
2807
+
2808
+ options = {
2809
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2810
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2811
+ query_params: {'api-version' => @client.api_version},
2812
+ headers: request_headers.merge(custom_headers || {}),
2813
+ base_url: request_url
2814
+ }
2815
+ promise = @client.make_request_async(:post, path_template, options)
2816
+
2817
+ promise = promise.then do |result|
2818
+ http_response = result.response
2819
+ status_code = http_response.status
2820
+ response_content = http_response.body
2821
+ unless status_code == 200 || status_code == 202
2822
+ error_model = JSON.load(response_content)
2823
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2824
+ end
2825
+
2826
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2827
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2828
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2829
+ # Deserialize Response
2830
+ if status_code == 200
2831
+ begin
2832
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2833
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineAssessPatchesResult.mapper()
2834
+ result.body = @client.deserialize(result_mapper, parsed_response)
2835
+ rescue Exception => e
2836
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2837
+ end
2838
+ end
2839
+
2840
+ result
2841
+ end
2842
+
2843
+ promise.execute
2844
+ end
2845
+
2846
+ #
2847
+ # Run command on the VM.
2848
+ #
2849
+ # @param resource_group_name [String] The name of the resource group.
2850
+ # @param vm_name [String] The name of the virtual machine.
2851
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2852
+ # operation.
2853
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2854
+ # will be added to the HTTP request.
2855
+ #
2856
+ # @return [RunCommandResult] operation results.
2857
+ #
2858
+ def begin_run_command(resource_group_name, vm_name, parameters, custom_headers:nil)
2859
+ response = begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2860
+ response.body unless response.nil?
2861
+ end
2862
+
2863
+ #
2864
+ # Run command on the VM.
2865
+ #
2866
+ # @param resource_group_name [String] The name of the resource group.
2867
+ # @param vm_name [String] The name of the virtual machine.
2868
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2869
+ # operation.
2870
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2871
+ # will be added to the HTTP request.
2872
+ #
2873
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2874
+ #
2875
+ def begin_run_command_with_http_info(resource_group_name, vm_name, parameters, custom_headers:nil)
2876
+ begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:custom_headers).value!
2877
+ end
2878
+
2879
+ #
2880
+ # Run command on the VM.
2881
+ #
2882
+ # @param resource_group_name [String] The name of the resource group.
2883
+ # @param vm_name [String] The name of the virtual machine.
2884
+ # @param parameters [RunCommandInput] Parameters supplied to the Run command
2885
+ # operation.
2886
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2887
+ # to the HTTP request.
2888
+ #
2889
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2890
+ #
2891
+ def begin_run_command_async(resource_group_name, vm_name, parameters, custom_headers:nil)
2892
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2893
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
2894
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
2895
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2896
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2897
+
2898
+
2899
+ request_headers = {}
2900
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2901
+
2902
+ # Set Headers
2903
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2904
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2905
+
2906
+ # Serialize Request
2907
+ request_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::RunCommandInput.mapper()
2908
+ request_content = @client.serialize(request_mapper, parameters)
2909
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2910
+
2911
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand'
2912
+
2913
+ request_url = @base_url || @client.base_url
2914
+
2915
+ options = {
2916
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2917
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
2918
+ query_params: {'api-version' => @client.api_version},
2919
+ body: request_content,
2920
+ headers: request_headers.merge(custom_headers || {}),
2921
+ base_url: request_url
2922
+ }
2923
+ promise = @client.make_request_async(:post, path_template, options)
2924
+
2925
+ promise = promise.then do |result|
2926
+ http_response = result.response
2927
+ status_code = http_response.status
2928
+ response_content = http_response.body
2929
+ unless status_code == 200 || status_code == 202
2930
+ error_model = JSON.load(response_content)
2931
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2932
+ end
2933
+
2934
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2935
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2936
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2937
+ # Deserialize Response
2938
+ if status_code == 200
2939
+ begin
2940
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2941
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::RunCommandResult.mapper()
2942
+ result.body = @client.deserialize(result_mapper, parsed_response)
2943
+ rescue Exception => e
2944
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
2945
+ end
2946
+ end
2947
+
2948
+ result
2949
+ end
2950
+
2951
+ promise.execute
2952
+ end
2953
+
2954
+ #
2955
+ # Gets all the virtual machines under the specified subscription for the
2956
+ # specified location.
2957
+ #
2958
+ # @param next_page_link [String] The NextLink from the previous successful call
2959
+ # to List operation.
2960
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2961
+ # will be added to the HTTP request.
2962
+ #
2963
+ # @return [VirtualMachineListResult] operation results.
2964
+ #
2965
+ def list_by_location_next(next_page_link, custom_headers:nil)
2966
+ response = list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2967
+ response.body unless response.nil?
2968
+ end
2969
+
2970
+ #
2971
+ # Gets all the virtual machines under the specified subscription for the
2972
+ # specified location.
2973
+ #
2974
+ # @param next_page_link [String] The NextLink from the previous successful call
2975
+ # to List operation.
2976
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2977
+ # will be added to the HTTP request.
2978
+ #
2979
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2980
+ #
2981
+ def list_by_location_next_with_http_info(next_page_link, custom_headers:nil)
2982
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers).value!
2983
+ end
2984
+
2985
+ #
2986
+ # Gets all the virtual machines under the specified subscription for the
2987
+ # specified location.
2988
+ #
2989
+ # @param next_page_link [String] The NextLink from the previous successful call
2990
+ # to List operation.
2991
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2992
+ # to the HTTP request.
2993
+ #
2994
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2995
+ #
2996
+ def list_by_location_next_async(next_page_link, custom_headers:nil)
2997
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
2998
+
2999
+
3000
+ request_headers = {}
3001
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3002
+
3003
+ # Set Headers
3004
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3005
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3006
+ path_template = '{nextLink}'
3007
+
3008
+ request_url = @base_url || @client.base_url
3009
+
3010
+ options = {
3011
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3012
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3013
+ headers: request_headers.merge(custom_headers || {}),
3014
+ base_url: request_url
3015
+ }
3016
+ promise = @client.make_request_async(:get, path_template, options)
3017
+
3018
+ promise = promise.then do |result|
3019
+ http_response = result.response
3020
+ status_code = http_response.status
3021
+ response_content = http_response.body
3022
+ unless status_code == 200
3023
+ error_model = JSON.load(response_content)
3024
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3025
+ end
3026
+
3027
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3028
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3029
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3030
+ # Deserialize Response
3031
+ if status_code == 200
3032
+ begin
3033
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3034
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineListResult.mapper()
3035
+ result.body = @client.deserialize(result_mapper, parsed_response)
3036
+ rescue Exception => e
3037
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3038
+ end
3039
+ end
3040
+
3041
+ result
3042
+ end
3043
+
3044
+ promise.execute
3045
+ end
3046
+
3047
+ #
3048
+ # Lists all of the virtual machines in the specified resource group. Use the
3049
+ # nextLink property in the response to get the next page of virtual machines.
3050
+ #
3051
+ # @param next_page_link [String] The NextLink from the previous successful call
3052
+ # to List operation.
3053
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3054
+ # will be added to the HTTP request.
3055
+ #
3056
+ # @return [VirtualMachineListResult] operation results.
3057
+ #
3058
+ def list_next(next_page_link, custom_headers:nil)
3059
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
3060
+ response.body unless response.nil?
3061
+ end
3062
+
3063
+ #
3064
+ # Lists all of the virtual machines in the specified resource group. Use the
3065
+ # nextLink property in the response to get the next page of virtual machines.
3066
+ #
3067
+ # @param next_page_link [String] The NextLink from the previous successful call
3068
+ # to List operation.
3069
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3070
+ # will be added to the HTTP request.
3071
+ #
3072
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3073
+ #
3074
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
3075
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
3076
+ end
3077
+
3078
+ #
3079
+ # Lists all of the virtual machines in the specified resource group. Use the
3080
+ # nextLink property in the response to get the next page of virtual machines.
3081
+ #
3082
+ # @param next_page_link [String] The NextLink from the previous successful call
3083
+ # to List operation.
3084
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3085
+ # to the HTTP request.
3086
+ #
3087
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3088
+ #
3089
+ def list_next_async(next_page_link, custom_headers:nil)
3090
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3091
+
3092
+
3093
+ request_headers = {}
3094
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3095
+
3096
+ # Set Headers
3097
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3098
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3099
+ path_template = '{nextLink}'
3100
+
3101
+ request_url = @base_url || @client.base_url
3102
+
3103
+ options = {
3104
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3105
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3106
+ headers: request_headers.merge(custom_headers || {}),
3107
+ base_url: request_url
3108
+ }
3109
+ promise = @client.make_request_async(:get, path_template, options)
3110
+
3111
+ promise = promise.then do |result|
3112
+ http_response = result.response
3113
+ status_code = http_response.status
3114
+ response_content = http_response.body
3115
+ unless status_code == 200
3116
+ error_model = JSON.load(response_content)
3117
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3118
+ end
3119
+
3120
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3121
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3122
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3123
+ # Deserialize Response
3124
+ if status_code == 200
3125
+ begin
3126
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3127
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineListResult.mapper()
3128
+ result.body = @client.deserialize(result_mapper, parsed_response)
3129
+ rescue Exception => e
3130
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3131
+ end
3132
+ end
3133
+
3134
+ result
3135
+ end
3136
+
3137
+ promise.execute
3138
+ end
3139
+
3140
+ #
3141
+ # Lists all of the virtual machines in the specified subscription. Use the
3142
+ # nextLink property in the response to get the next page of virtual machines.
3143
+ #
3144
+ # @param next_page_link [String] The NextLink from the previous successful call
3145
+ # to List operation.
3146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3147
+ # will be added to the HTTP request.
3148
+ #
3149
+ # @return [VirtualMachineListResult] operation results.
3150
+ #
3151
+ def list_all_next(next_page_link, custom_headers:nil)
3152
+ response = list_all_next_async(next_page_link, custom_headers:custom_headers).value!
3153
+ response.body unless response.nil?
3154
+ end
3155
+
3156
+ #
3157
+ # Lists all of the virtual machines in the specified subscription. Use the
3158
+ # nextLink property in the response to get the next page of virtual machines.
3159
+ #
3160
+ # @param next_page_link [String] The NextLink from the previous successful call
3161
+ # to List operation.
3162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3163
+ # will be added to the HTTP request.
3164
+ #
3165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
3166
+ #
3167
+ def list_all_next_with_http_info(next_page_link, custom_headers:nil)
3168
+ list_all_next_async(next_page_link, custom_headers:custom_headers).value!
3169
+ end
3170
+
3171
+ #
3172
+ # Lists all of the virtual machines in the specified subscription. Use the
3173
+ # nextLink property in the response to get the next page of virtual machines.
3174
+ #
3175
+ # @param next_page_link [String] The NextLink from the previous successful call
3176
+ # to List operation.
3177
+ # @param [Hash{String => String}] A hash of custom headers that will be added
3178
+ # to the HTTP request.
3179
+ #
3180
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
3181
+ #
3182
+ def list_all_next_async(next_page_link, custom_headers:nil)
3183
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
3184
+
3185
+
3186
+ request_headers = {}
3187
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
3188
+
3189
+ # Set Headers
3190
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
3191
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
3192
+ path_template = '{nextLink}'
3193
+
3194
+ request_url = @base_url || @client.base_url
3195
+
3196
+ options = {
3197
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
3198
+ skip_encoding_path_params: {'nextLink' => next_page_link},
3199
+ headers: request_headers.merge(custom_headers || {}),
3200
+ base_url: request_url
3201
+ }
3202
+ promise = @client.make_request_async(:get, path_template, options)
3203
+
3204
+ promise = promise.then do |result|
3205
+ http_response = result.response
3206
+ status_code = http_response.status
3207
+ response_content = http_response.body
3208
+ unless status_code == 200
3209
+ error_model = JSON.load(response_content)
3210
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
3211
+ end
3212
+
3213
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
3214
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
3215
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
3216
+ # Deserialize Response
3217
+ if status_code == 200
3218
+ begin
3219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
3220
+ result_mapper = Azure::Compute::Mgmt::V2020_06_01::Models::VirtualMachineListResult.mapper()
3221
+ result.body = @client.deserialize(result_mapper, parsed_response)
3222
+ rescue Exception => e
3223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
3224
+ end
3225
+ end
3226
+
3227
+ result
3228
+ end
3229
+
3230
+ promise.execute
3231
+ end
3232
+
3233
+ #
3234
+ # Gets all the virtual machines under the specified subscription for the
3235
+ # specified location.
3236
+ #
3237
+ # @param location [String] The location for which virtual machines under the
3238
+ # subscription are queried.
3239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3240
+ # will be added to the HTTP request.
3241
+ #
3242
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
3243
+ # response.
3244
+ #
3245
+ def list_by_location_as_lazy(location, custom_headers:nil)
3246
+ response = list_by_location_async(location, custom_headers:custom_headers).value!
3247
+ unless response.nil?
3248
+ page = response.body
3249
+ page.next_method = Proc.new do |next_page_link|
3250
+ list_by_location_next_async(next_page_link, custom_headers:custom_headers)
3251
+ end
3252
+ page
3253
+ end
3254
+ end
3255
+
3256
+ #
3257
+ # Lists all of the virtual machines in the specified resource group. Use the
3258
+ # nextLink property in the response to get the next page of virtual machines.
3259
+ #
3260
+ # @param resource_group_name [String] The name of the resource group.
3261
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3262
+ # will be added to the HTTP request.
3263
+ #
3264
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
3265
+ # response.
3266
+ #
3267
+ def list_as_lazy(resource_group_name, custom_headers:nil)
3268
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
3269
+ unless response.nil?
3270
+ page = response.body
3271
+ page.next_method = Proc.new do |next_page_link|
3272
+ list_next_async(next_page_link, custom_headers:custom_headers)
3273
+ end
3274
+ page
3275
+ end
3276
+ end
3277
+
3278
+ #
3279
+ # Lists all of the virtual machines in the specified subscription. Use the
3280
+ # nextLink property in the response to get the next page of virtual machines.
3281
+ #
3282
+ # @param status_only [String] statusOnly=true enables fetching run time status
3283
+ # of all Virtual Machines in the subscription.
3284
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
3285
+ # will be added to the HTTP request.
3286
+ #
3287
+ # @return [VirtualMachineListResult] which provide lazy access to pages of the
3288
+ # response.
3289
+ #
3290
+ def list_all_as_lazy(status_only:nil, custom_headers:nil)
3291
+ response = list_all_async(status_only:status_only, custom_headers:custom_headers).value!
3292
+ unless response.nil?
3293
+ page = response.body
3294
+ page.next_method = Proc.new do |next_page_link|
3295
+ list_all_next_async(next_page_link, custom_headers:custom_headers)
3296
+ end
3297
+ page
3298
+ end
3299
+ end
3300
+
3301
+ end
3302
+ end