azure_mgmt_compute 0.21.1 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) 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-07-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  15. data/lib/2019-11-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  16. data/lib/2019-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  17. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +3 -2
  18. data/lib/2020-06-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  19. data/lib/2020-06-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  20. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  21. data/lib/2020-09-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  22. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  23. data/lib/2020-12-01/generated/azure_mgmt_compute.rb +305 -0
  24. data/lib/2020-12-01/generated/azure_mgmt_compute/availability_sets.rb +920 -0
  25. data/lib/2020-12-01/generated/azure_mgmt_compute/compute_management_client.rb +221 -0
  26. data/lib/2020-12-01/generated/azure_mgmt_compute/dedicated_host_groups.rb +861 -0
  27. data/lib/2020-12-01/generated/azure_mgmt_compute/dedicated_hosts.rb +806 -0
  28. data/lib/2020-12-01/generated/azure_mgmt_compute/images.rb +975 -0
  29. data/lib/2020-12-01/generated/azure_mgmt_compute/log_analytics.rb +341 -0
  30. data/lib/2020-12-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  31. data/lib/2020-12-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb +93 -0
  32. data/lib/2020-12-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +47 -0
  33. data/lib/2020-12-01/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  34. data/lib/2020-12-01/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  35. data/lib/2020-12-01/generated/azure_mgmt_compute/models/automatic_osupgrade_policy.rb +63 -0
  36. data/lib/2020-12-01/generated/azure_mgmt_compute/models/automatic_osupgrade_properties.rb +47 -0
  37. data/lib/2020-12-01/generated/azure_mgmt_compute/models/automatic_repairs_policy.rb +64 -0
  38. data/lib/2020-12-01/generated/azure_mgmt_compute/models/availability_set.rb +189 -0
  39. data/lib/2020-12-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb +100 -0
  40. data/lib/2020-12-01/generated/azure_mgmt_compute/models/availability_set_sku_types.rb +16 -0
  41. data/lib/2020-12-01/generated/azure_mgmt_compute/models/availability_set_update.rb +142 -0
  42. data/lib/2020-12-01/generated/azure_mgmt_compute/models/available_patch_summary.rb +143 -0
  43. data/lib/2020-12-01/generated/azure_mgmt_compute/models/billing_profile.rb +60 -0
  44. data/lib/2020-12-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb +63 -0
  45. data/lib/2020-12-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +78 -0
  46. data/lib/2020-12-01/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
  47. data/lib/2020-12-01/generated/azure_mgmt_compute/models/component_names.rb +15 -0
  48. data/lib/2020-12-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  49. data/lib/2020-12-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  50. data/lib/2020-12-01/generated/azure_mgmt_compute/models/data_disk.rb +224 -0
  51. data/lib/2020-12-01/generated/azure_mgmt_compute/models/data_disk_image.rb +49 -0
  52. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host.rb +219 -0
  53. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_allocatable_vm.rb +60 -0
  54. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_available_capacity.rb +57 -0
  55. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_group.rb +178 -0
  56. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_group_instance_view.rb +57 -0
  57. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_group_list_result.rb +100 -0
  58. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_group_update.rb +141 -0
  59. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view.rb +81 -0
  60. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view_with_name.rb +84 -0
  61. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_license_types.rb +17 -0
  62. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_list_result.rb +100 -0
  63. data/lib/2020-12-01/generated/azure_mgmt_compute/models/dedicated_host_update.rb +171 -0
  64. data/lib/2020-12-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb +52 -0
  65. data/lib/2020-12-01/generated/azure_mgmt_compute/models/diff_disk_options.rb +15 -0
  66. data/lib/2020-12-01/generated/azure_mgmt_compute/models/diff_disk_placement.rb +16 -0
  67. data/lib/2020-12-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +69 -0
  68. data/lib/2020-12-01/generated/azure_mgmt_compute/models/disallowed_configuration.rb +47 -0
  69. data/lib/2020-12-01/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
  70. data/lib/2020-12-01/generated/azure_mgmt_compute/models/disk_detach_option_types.rb +15 -0
  71. data/lib/2020-12-01/generated/azure_mgmt_compute/models/disk_encryption_set_parameters.rb +46 -0
  72. data/lib/2020-12-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +73 -0
  73. data/lib/2020-12-01/generated/azure_mgmt_compute/models/disk_instance_view.rb +87 -0
  74. data/lib/2020-12-01/generated/azure_mgmt_compute/models/execution_state.rb +21 -0
  75. data/lib/2020-12-01/generated/azure_mgmt_compute/models/extended_location.rb +58 -0
  76. data/lib/2020-12-01/generated/azure_mgmt_compute/models/extended_location_types.rb +15 -0
  77. data/lib/2020-12-01/generated/azure_mgmt_compute/models/hardware_profile.rb +106 -0
  78. data/lib/2020-12-01/generated/azure_mgmt_compute/models/hyper_vgeneration_type.rb +16 -0
  79. data/lib/2020-12-01/generated/azure_mgmt_compute/models/hyper_vgeneration_types.rb +16 -0
  80. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image.rb +151 -0
  81. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_data_disk.rb +108 -0
  82. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_disk.rb +126 -0
  83. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_list_result.rb +99 -0
  84. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_osdisk.rb +123 -0
  85. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_reference.rb +114 -0
  86. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +86 -0
  87. data/lib/2020-12-01/generated/azure_mgmt_compute/models/image_update.rb +102 -0
  88. data/lib/2020-12-01/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  89. data/lib/2020-12-01/generated/azure_mgmt_compute/models/instance_view_status.rb +93 -0
  90. data/lib/2020-12-01/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  91. data/lib/2020-12-01/generated/azure_mgmt_compute/models/interval_in_mins.rb +18 -0
  92. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ipversion.rb +16 -0
  93. data/lib/2020-12-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +59 -0
  94. data/lib/2020-12-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +59 -0
  95. data/lib/2020-12-01/generated/azure_mgmt_compute/models/last_patch_installation_summary.rb +179 -0
  96. data/lib/2020-12-01/generated/azure_mgmt_compute/models/linux_configuration.rb +94 -0
  97. data/lib/2020-12-01/generated/azure_mgmt_compute/models/linux_parameters.rb +107 -0
  98. data/lib/2020-12-01/generated/azure_mgmt_compute/models/linux_patch_settings.rb +52 -0
  99. data/lib/2020-12-01/generated/azure_mgmt_compute/models/linux_vmguest_patch_mode.rb +16 -0
  100. data/lib/2020-12-01/generated/azure_mgmt_compute/models/list_usages_result.rb +100 -0
  101. data/lib/2020-12-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +124 -0
  102. data/lib/2020-12-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb +48 -0
  103. data/lib/2020-12-01/generated/azure_mgmt_compute/models/log_analytics_output.rb +47 -0
  104. data/lib/2020-12-01/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +18 -0
  105. data/lib/2020-12-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +115 -0
  106. data/lib/2020-12-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +70 -0
  107. data/lib/2020-12-01/generated/azure_mgmt_compute/models/network_interface_reference.rb +55 -0
  108. data/lib/2020-12-01/generated/azure_mgmt_compute/models/network_profile.rb +57 -0
  109. data/lib/2020-12-01/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  110. data/lib/2020-12-01/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  111. data/lib/2020-12-01/generated/azure_mgmt_compute/models/orchestration_mode.rb +16 -0
  112. data/lib/2020-12-01/generated/azure_mgmt_compute/models/orchestration_service_names.rb +16 -0
  113. data/lib/2020-12-01/generated/azure_mgmt_compute/models/orchestration_service_state.rb +17 -0
  114. data/lib/2020-12-01/generated/azure_mgmt_compute/models/orchestration_service_state_action.rb +16 -0
  115. data/lib/2020-12-01/generated/azure_mgmt_compute/models/orchestration_service_state_input.rb +59 -0
  116. data/lib/2020-12-01/generated/azure_mgmt_compute/models/orchestration_service_summary.rb +61 -0
  117. data/lib/2020-12-01/generated/azure_mgmt_compute/models/osdisk.rb +191 -0
  118. data/lib/2020-12-01/generated/azure_mgmt_compute/models/osdisk_image.rb +48 -0
  119. data/lib/2020-12-01/generated/azure_mgmt_compute/models/osprofile.rb +204 -0
  120. data/lib/2020-12-01/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
  121. data/lib/2020-12-01/generated/azure_mgmt_compute/models/patch_assessment_state.rb +16 -0
  122. data/lib/2020-12-01/generated/azure_mgmt_compute/models/patch_installation_detail.rb +121 -0
  123. data/lib/2020-12-01/generated/azure_mgmt_compute/models/patch_installation_state.rb +20 -0
  124. data/lib/2020-12-01/generated/azure_mgmt_compute/models/patch_operation_status.rb +19 -0
  125. data/lib/2020-12-01/generated/azure_mgmt_compute/models/patch_settings.rb +71 -0
  126. data/lib/2020-12-01/generated/azure_mgmt_compute/models/plan.rb +86 -0
  127. data/lib/2020-12-01/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
  128. data/lib/2020-12-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +180 -0
  129. data/lib/2020-12-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  130. data/lib/2020-12-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  131. data/lib/2020-12-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  132. data/lib/2020-12-01/generated/azure_mgmt_compute/models/purchase_plan.rb +71 -0
  133. data/lib/2020-12-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb +60 -0
  134. data/lib/2020-12-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +113 -0
  135. data/lib/2020-12-01/generated/azure_mgmt_compute/models/resource.rb +110 -0
  136. data/lib/2020-12-01/generated/azure_mgmt_compute/models/resource_identity_type.rb +18 -0
  137. data/lib/2020-12-01/generated/azure_mgmt_compute/models/retrieve_boot_diagnostics_data_result.rb +59 -0
  138. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rollback_status_info.rb +74 -0
  139. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +16 -0
  140. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb +133 -0
  141. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +88 -0
  142. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +88 -0
  143. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +18 -0
  144. data/lib/2020-12-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +141 -0
  145. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_document.rb +116 -0
  146. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_document_base.rb +92 -0
  147. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_input.rb +87 -0
  148. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +57 -0
  149. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_list_result.rb +100 -0
  150. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +81 -0
  151. data/lib/2020-12-01/generated/azure_mgmt_compute/models/run_command_result.rb +56 -0
  152. data/lib/2020-12-01/generated/azure_mgmt_compute/models/scale_in_policy.rb +71 -0
  153. data/lib/2020-12-01/generated/azure_mgmt_compute/models/scheduled_events_profile.rb +49 -0
  154. data/lib/2020-12-01/generated/azure_mgmt_compute/models/security_profile.rb +81 -0
  155. data/lib/2020-12-01/generated/azure_mgmt_compute/models/security_types.rb +15 -0
  156. data/lib/2020-12-01/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
  157. data/lib/2020-12-01/generated/azure_mgmt_compute/models/sku.rb +73 -0
  158. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ssh_configuration.rb +56 -0
  159. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +64 -0
  160. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ssh_public_key_generate_key_pair_result.rb +73 -0
  161. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ssh_public_key_resource.rb +102 -0
  162. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ssh_public_key_update_resource.rb +67 -0
  163. data/lib/2020-12-01/generated/azure_mgmt_compute/models/ssh_public_keys_group_list_result.rb +100 -0
  164. data/lib/2020-12-01/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  165. data/lib/2020-12-01/generated/azure_mgmt_compute/models/storage_account_types.rb +18 -0
  166. data/lib/2020-12-01/generated/azure_mgmt_compute/models/storage_profile.rb +89 -0
  167. data/lib/2020-12-01/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  168. data/lib/2020-12-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +48 -0
  169. data/lib/2020-12-01/generated/azure_mgmt_compute/models/sub_resource_with_colocation_status.rb +57 -0
  170. data/lib/2020-12-01/generated/azure_mgmt_compute/models/terminate_notification_profile.rb +62 -0
  171. data/lib/2020-12-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +99 -0
  172. data/lib/2020-12-01/generated/azure_mgmt_compute/models/uefi_settings.rb +60 -0
  173. data/lib/2020-12-01/generated/azure_mgmt_compute/models/update_resource.rb +54 -0
  174. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_mode.rb +17 -0
  175. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb +73 -0
  176. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +116 -0
  177. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb +74 -0
  178. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_operation_invoker.rb +17 -0
  179. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_policy.rb +79 -0
  180. data/lib/2020-12-01/generated/azure_mgmt_compute/models/upgrade_state.rb +18 -0
  181. data/lib/2020-12-01/generated/azure_mgmt_compute/models/usage.rb +83 -0
  182. data/lib/2020-12-01/generated/azure_mgmt_compute/models/usage_name.rb +57 -0
  183. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vault_certificate.rb +72 -0
  184. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vault_secret_group.rb +69 -0
  185. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +46 -0
  186. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine.rb +488 -0
  187. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +87 -0
  188. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_assess_patches_result.rb +152 -0
  189. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +69 -0
  190. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +99 -0
  191. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_eviction_policy_types.rb +16 -0
  192. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +208 -0
  193. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +71 -0
  194. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +146 -0
  195. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +109 -0
  196. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_extension_update.rb +147 -0
  197. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb +55 -0
  198. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb +48 -0
  199. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +102 -0
  200. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb +61 -0
  201. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_image.rb +184 -0
  202. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_image_feature.rb +57 -0
  203. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +100 -0
  204. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_install_patches_parameters.rb +87 -0
  205. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_install_patches_result.rb +204 -0
  206. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +258 -0
  207. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +99 -0
  208. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_patch_status.rb +83 -0
  209. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_priority_types.rb +17 -0
  210. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +49 -0
  211. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_run_command.rb +241 -0
  212. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_instance_view.rb +135 -0
  213. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_script_source.rb +68 -0
  214. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_update.rb +206 -0
  215. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_run_commands_list_result.rb +98 -0
  216. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +358 -0
  217. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +153 -0
  218. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +197 -0
  219. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +103 -0
  220. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +70 -0
  221. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_update.rb +198 -0
  222. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +105 -0
  223. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb +61 -0
  224. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +113 -0
  225. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +59 -0
  226. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb +58 -0
  227. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +195 -0
  228. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb +104 -0
  229. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +100 -0
  230. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +101 -0
  231. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +102 -0
  232. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +63 -0
  233. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +149 -0
  234. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +56 -0
  235. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +71 -0
  236. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +180 -0
  237. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +167 -0
  238. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +120 -0
  239. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +51 -0
  240. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  241. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_scale_in_rules.rb +17 -0
  242. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +74 -0
  243. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +85 -0
  244. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  245. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +91 -0
  246. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +210 -0
  247. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +190 -0
  248. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +148 -0
  249. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +72 -0
  250. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +122 -0
  251. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +92 -0
  252. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +72 -0
  253. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +80 -0
  254. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +151 -0
  255. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +398 -0
  256. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension.rb +190 -0
  257. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension_update.rb +164 -0
  258. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_list_result.rb +57 -0
  259. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +70 -0
  260. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  261. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +55 -0
  262. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +211 -0
  263. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +101 -0
  264. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmnetwork_profile_configuration.rb +57 -0
  265. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +190 -0
  266. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprotection_policy.rb +60 -0
  267. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  268. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb +106 -0
  269. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +55 -0
  270. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +180 -0
  271. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_software_patch_properties.rb +172 -0
  272. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +61 -0
  273. data/lib/2020-12-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +418 -0
  274. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vm_disk_types.rb +16 -0
  275. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vmguest_patch_classification_linux.rb +17 -0
  276. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vmguest_patch_classification_windows.rb +22 -0
  277. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vmguest_patch_reboot_behavior.rb +18 -0
  278. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vmguest_patch_reboot_setting.rb +17 -0
  279. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vmguest_patch_reboot_status.rb +20 -0
  280. data/lib/2020-12-01/generated/azure_mgmt_compute/models/vmscale_set_convert_to_single_placement_group_input.rb +52 -0
  281. data/lib/2020-12-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +56 -0
  282. data/lib/2020-12-01/generated/azure_mgmt_compute/models/win_rmlistener.rb +67 -0
  283. data/lib/2020-12-01/generated/azure_mgmt_compute/models/windows_configuration.rb +127 -0
  284. data/lib/2020-12-01/generated/azure_mgmt_compute/models/windows_parameters.rb +117 -0
  285. data/lib/2020-12-01/generated/azure_mgmt_compute/models/windows_vmguest_patch_mode.rb +17 -0
  286. data/lib/2020-12-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  287. data/lib/2020-12-01/generated/azure_mgmt_compute/operations.rb +109 -0
  288. data/lib/2020-12-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +846 -0
  289. data/lib/2020-12-01/generated/azure_mgmt_compute/ssh_public_keys.rb +939 -0
  290. data/lib/2020-12-01/generated/azure_mgmt_compute/usage_operations.rb +241 -0
  291. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +360 -0
  292. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb +701 -0
  293. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_images.rb +600 -0
  294. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_images_edge_zone.rb +626 -0
  295. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +1112 -0
  296. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +821 -0
  297. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +498 -0
  298. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmextensions.rb +709 -0
  299. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmrun_commands.rb +827 -0
  300. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +2230 -0
  301. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +3523 -0
  302. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +122 -0
  303. data/lib/2020-12-01/generated/azure_mgmt_compute/virtual_machines.rb +3446 -0
  304. data/lib/azure_mgmt_compute.rb +1 -0
  305. data/lib/profiles/latest/modules/compute_profile_module.rb +1010 -944
  306. data/lib/version.rb +1 -1
  307. metadata +283 -2
@@ -0,0 +1,1112 @@
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_12_01
7
+ #
8
+ # Compute Client
9
+ #
10
+ class VirtualMachineRunCommands
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VirtualMachineRunCommands class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all available run commands for a subscription in a location.
26
+ #
27
+ # @param location [String] The location upon which run commands is queried.
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<RunCommandDocumentBase>] operation results.
32
+ #
33
+ def list(location, custom_headers:nil)
34
+ first_page = list_as_lazy(location, custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Lists all available run commands for a subscription in a location.
40
+ #
41
+ # @param location [String] The location upon which run commands is queried.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(location, custom_headers:nil)
48
+ list_async(location, custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Lists all available run commands for a subscription in a location.
53
+ #
54
+ # @param location [String] The location upon which run commands is queried.
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(location, custom_headers:nil)
61
+ fail ArgumentError, 'location is nil' if location.nil?
62
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
63
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+
66
+
67
+ request_headers = {}
68
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
+
70
+ # Set Headers
71
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
72
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
73
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands'
74
+
75
+ request_url = @base_url || @client.base_url
76
+
77
+ options = {
78
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
79
+ path_params: {'location' => location,'subscriptionId' => @client.subscription_id},
80
+ query_params: {'api-version' => @client.api_version},
81
+ headers: request_headers.merge(custom_headers || {}),
82
+ base_url: request_url
83
+ }
84
+ promise = @client.make_request_async(:get, path_template, options)
85
+
86
+ promise = promise.then do |result|
87
+ http_response = result.response
88
+ status_code = http_response.status
89
+ response_content = http_response.body
90
+ unless status_code == 200
91
+ error_model = JSON.load(response_content)
92
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
93
+ end
94
+
95
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
96
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
97
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
98
+ # Deserialize Response
99
+ if status_code == 200
100
+ begin
101
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
102
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::RunCommandListResult.mapper()
103
+ result.body = @client.deserialize(result_mapper, parsed_response)
104
+ rescue Exception => e
105
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
106
+ end
107
+ end
108
+
109
+ result
110
+ end
111
+
112
+ promise.execute
113
+ end
114
+
115
+ #
116
+ # Gets specific run command for a subscription in a location.
117
+ #
118
+ # @param location [String] The location upon which run commands is queried.
119
+ # @param command_id [String] The command id.
120
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
121
+ # will be added to the HTTP request.
122
+ #
123
+ # @return [RunCommandDocument] operation results.
124
+ #
125
+ def get(location, command_id, custom_headers:nil)
126
+ response = get_async(location, command_id, custom_headers:custom_headers).value!
127
+ response.body unless response.nil?
128
+ end
129
+
130
+ #
131
+ # Gets specific run command for a subscription in a location.
132
+ #
133
+ # @param location [String] The location upon which run commands is queried.
134
+ # @param command_id [String] The command id.
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
139
+ #
140
+ def get_with_http_info(location, command_id, custom_headers:nil)
141
+ get_async(location, command_id, custom_headers:custom_headers).value!
142
+ end
143
+
144
+ #
145
+ # Gets specific run command for a subscription in a location.
146
+ #
147
+ # @param location [String] The location upon which run commands is queried.
148
+ # @param command_id [String] The command id.
149
+ # @param [Hash{String => String}] A hash of custom headers that will be added
150
+ # to the HTTP request.
151
+ #
152
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
153
+ #
154
+ def get_async(location, command_id, custom_headers:nil)
155
+ fail ArgumentError, 'location is nil' if location.nil?
156
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
157
+ fail ArgumentError, 'command_id is nil' if command_id.nil?
158
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
159
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
160
+
161
+
162
+ request_headers = {}
163
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
164
+
165
+ # Set Headers
166
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
167
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
168
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'
169
+
170
+ request_url = @base_url || @client.base_url
171
+
172
+ options = {
173
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
174
+ path_params: {'location' => location,'commandId' => command_id,'subscriptionId' => @client.subscription_id},
175
+ query_params: {'api-version' => @client.api_version},
176
+ headers: request_headers.merge(custom_headers || {}),
177
+ base_url: request_url
178
+ }
179
+ promise = @client.make_request_async(:get, path_template, options)
180
+
181
+ promise = promise.then do |result|
182
+ http_response = result.response
183
+ status_code = http_response.status
184
+ response_content = http_response.body
185
+ unless status_code == 200
186
+ error_model = JSON.load(response_content)
187
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
188
+ end
189
+
190
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
191
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
192
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
193
+ # Deserialize Response
194
+ if status_code == 200
195
+ begin
196
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
197
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::RunCommandDocument.mapper()
198
+ result.body = @client.deserialize(result_mapper, parsed_response)
199
+ rescue Exception => e
200
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
201
+ end
202
+ end
203
+
204
+ result
205
+ end
206
+
207
+ promise.execute
208
+ end
209
+
210
+ #
211
+ # The operation to create or update the run command.
212
+ #
213
+ # @param resource_group_name [String] The name of the resource group.
214
+ # @param vm_name [String] The name of the virtual machine where the run command
215
+ # should be created or updated.
216
+ # @param run_command_name [String] The name of the virtual machine run command.
217
+ # @param run_command [VirtualMachineRunCommand] Parameters supplied to the
218
+ # Create Virtual Machine RunCommand operation.
219
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
220
+ # will be added to the HTTP request.
221
+ #
222
+ # @return [VirtualMachineRunCommand] operation results.
223
+ #
224
+ def create_or_update(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
225
+ response = create_or_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers).value!
226
+ response.body unless response.nil?
227
+ end
228
+
229
+ #
230
+ # @param resource_group_name [String] The name of the resource group.
231
+ # @param vm_name [String] The name of the virtual machine where the run command
232
+ # should be created or updated.
233
+ # @param run_command_name [String] The name of the virtual machine run command.
234
+ # @param run_command [VirtualMachineRunCommand] Parameters supplied to the
235
+ # Create Virtual Machine RunCommand operation.
236
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
237
+ # will be added to the HTTP request.
238
+ #
239
+ # @return [Concurrent::Promise] promise which provides async access to http
240
+ # response.
241
+ #
242
+ def create_or_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
243
+ # Send request
244
+ promise = begin_create_or_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers)
245
+
246
+ promise = promise.then do |response|
247
+ # Defining deserialization method.
248
+ deserialize_method = lambda do |parsed_response|
249
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
250
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
251
+ end
252
+
253
+ # Waiting for response.
254
+ @client.get_long_running_operation_result(response, deserialize_method)
255
+ end
256
+
257
+ promise
258
+ end
259
+
260
+ #
261
+ # The operation to update the run command.
262
+ #
263
+ # @param resource_group_name [String] The name of the resource group.
264
+ # @param vm_name [String] The name of the virtual machine where the run command
265
+ # should be updated.
266
+ # @param run_command_name [String] The name of the virtual machine run command.
267
+ # @param run_command [VirtualMachineRunCommandUpdate] Parameters supplied to
268
+ # the Update Virtual Machine RunCommand operation.
269
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
+ # will be added to the HTTP request.
271
+ #
272
+ # @return [VirtualMachineRunCommand] operation results.
273
+ #
274
+ def update(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
275
+ response = update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers).value!
276
+ response.body unless response.nil?
277
+ end
278
+
279
+ #
280
+ # @param resource_group_name [String] The name of the resource group.
281
+ # @param vm_name [String] The name of the virtual machine where the run command
282
+ # should be updated.
283
+ # @param run_command_name [String] The name of the virtual machine run command.
284
+ # @param run_command [VirtualMachineRunCommandUpdate] Parameters supplied to
285
+ # the Update Virtual Machine RunCommand operation.
286
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
287
+ # will be added to the HTTP request.
288
+ #
289
+ # @return [Concurrent::Promise] promise which provides async access to http
290
+ # response.
291
+ #
292
+ def update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
293
+ # Send request
294
+ promise = begin_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers)
295
+
296
+ promise = promise.then do |response|
297
+ # Defining deserialization method.
298
+ deserialize_method = lambda do |parsed_response|
299
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
300
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
301
+ end
302
+
303
+ # Waiting for response.
304
+ @client.get_long_running_operation_result(response, deserialize_method)
305
+ end
306
+
307
+ promise
308
+ end
309
+
310
+ #
311
+ # The operation to delete the run command.
312
+ #
313
+ # @param resource_group_name [String] The name of the resource group.
314
+ # @param vm_name [String] The name of the virtual machine where the run command
315
+ # should be deleted.
316
+ # @param run_command_name [String] The name of the virtual machine run command.
317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
318
+ # will be added to the HTTP request.
319
+ #
320
+ def delete(resource_group_name, vm_name, run_command_name, custom_headers:nil)
321
+ response = delete_async(resource_group_name, vm_name, run_command_name, custom_headers:custom_headers).value!
322
+ nil
323
+ end
324
+
325
+ #
326
+ # @param resource_group_name [String] The name of the resource group.
327
+ # @param vm_name [String] The name of the virtual machine where the run command
328
+ # should be deleted.
329
+ # @param run_command_name [String] The name of the virtual machine run command.
330
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
331
+ # will be added to the HTTP request.
332
+ #
333
+ # @return [Concurrent::Promise] promise which provides async access to http
334
+ # response.
335
+ #
336
+ def delete_async(resource_group_name, vm_name, run_command_name, custom_headers:nil)
337
+ # Send request
338
+ promise = begin_delete_async(resource_group_name, vm_name, run_command_name, custom_headers:custom_headers)
339
+
340
+ promise = promise.then do |response|
341
+ # Defining deserialization method.
342
+ deserialize_method = lambda do |parsed_response|
343
+ end
344
+
345
+ # Waiting for response.
346
+ @client.get_long_running_operation_result(response, deserialize_method)
347
+ end
348
+
349
+ promise
350
+ end
351
+
352
+ #
353
+ # The operation to get the run command.
354
+ #
355
+ # @param resource_group_name [String] The name of the resource group.
356
+ # @param vm_name [String] The name of the virtual machine containing the run
357
+ # command.
358
+ # @param run_command_name [String] The name of the virtual machine run command.
359
+ # @param expand [String] The expand expression to apply on the operation.
360
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
361
+ # will be added to the HTTP request.
362
+ #
363
+ # @return [VirtualMachineRunCommand] operation results.
364
+ #
365
+ def get_by_virtual_machine(resource_group_name, vm_name, run_command_name, expand:nil, custom_headers:nil)
366
+ response = get_by_virtual_machine_async(resource_group_name, vm_name, run_command_name, expand:expand, custom_headers:custom_headers).value!
367
+ response.body unless response.nil?
368
+ end
369
+
370
+ #
371
+ # The operation to get the run command.
372
+ #
373
+ # @param resource_group_name [String] The name of the resource group.
374
+ # @param vm_name [String] The name of the virtual machine containing the run
375
+ # command.
376
+ # @param run_command_name [String] The name of the virtual machine run command.
377
+ # @param expand [String] The expand expression to apply on the operation.
378
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
379
+ # will be added to the HTTP request.
380
+ #
381
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
382
+ #
383
+ def get_by_virtual_machine_with_http_info(resource_group_name, vm_name, run_command_name, expand:nil, custom_headers:nil)
384
+ get_by_virtual_machine_async(resource_group_name, vm_name, run_command_name, expand:expand, custom_headers:custom_headers).value!
385
+ end
386
+
387
+ #
388
+ # The operation to get the run command.
389
+ #
390
+ # @param resource_group_name [String] The name of the resource group.
391
+ # @param vm_name [String] The name of the virtual machine containing the run
392
+ # command.
393
+ # @param run_command_name [String] The name of the virtual machine run command.
394
+ # @param expand [String] The expand expression to apply on the operation.
395
+ # @param [Hash{String => String}] A hash of custom headers that will be added
396
+ # to the HTTP request.
397
+ #
398
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
399
+ #
400
+ def get_by_virtual_machine_async(resource_group_name, vm_name, run_command_name, expand:nil, custom_headers:nil)
401
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
402
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
403
+ fail ArgumentError, 'run_command_name is nil' if run_command_name.nil?
404
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
405
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
406
+
407
+
408
+ request_headers = {}
409
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
410
+
411
+ # Set Headers
412
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
413
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
414
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'
415
+
416
+ request_url = @base_url || @client.base_url
417
+
418
+ options = {
419
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
420
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'runCommandName' => run_command_name,'subscriptionId' => @client.subscription_id},
421
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
422
+ headers: request_headers.merge(custom_headers || {}),
423
+ base_url: request_url
424
+ }
425
+ promise = @client.make_request_async(:get, path_template, options)
426
+
427
+ promise = promise.then do |result|
428
+ http_response = result.response
429
+ status_code = http_response.status
430
+ response_content = http_response.body
431
+ unless status_code == 200
432
+ error_model = JSON.load(response_content)
433
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
434
+ end
435
+
436
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
437
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
438
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
439
+ # Deserialize Response
440
+ if status_code == 200
441
+ begin
442
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
443
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
444
+ result.body = @client.deserialize(result_mapper, parsed_response)
445
+ rescue Exception => e
446
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
447
+ end
448
+ end
449
+
450
+ result
451
+ end
452
+
453
+ promise.execute
454
+ end
455
+
456
+ #
457
+ # The operation to get all run commands of a Virtual Machine.
458
+ #
459
+ # @param resource_group_name [String] The name of the resource group.
460
+ # @param vm_name [String] The name of the virtual machine containing the run
461
+ # command.
462
+ # @param expand [String] The expand expression to apply on the operation.
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [Array<VirtualMachineRunCommand>] operation results.
467
+ #
468
+ def list_by_virtual_machine(resource_group_name, vm_name, expand:nil, custom_headers:nil)
469
+ first_page = list_by_virtual_machine_as_lazy(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers)
470
+ first_page.get_all_items
471
+ end
472
+
473
+ #
474
+ # The operation to get all run commands of a Virtual Machine.
475
+ #
476
+ # @param resource_group_name [String] The name of the resource group.
477
+ # @param vm_name [String] The name of the virtual machine containing the run
478
+ # command.
479
+ # @param expand [String] The expand expression to apply on the operation.
480
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
481
+ # will be added to the HTTP request.
482
+ #
483
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
484
+ #
485
+ def list_by_virtual_machine_with_http_info(resource_group_name, vm_name, expand:nil, custom_headers:nil)
486
+ list_by_virtual_machine_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
487
+ end
488
+
489
+ #
490
+ # The operation to get all run commands of a Virtual Machine.
491
+ #
492
+ # @param resource_group_name [String] The name of the resource group.
493
+ # @param vm_name [String] The name of the virtual machine containing the run
494
+ # command.
495
+ # @param expand [String] The expand expression to apply on the operation.
496
+ # @param [Hash{String => String}] A hash of custom headers that will be added
497
+ # to the HTTP request.
498
+ #
499
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
500
+ #
501
+ def list_by_virtual_machine_async(resource_group_name, vm_name, expand:nil, custom_headers:nil)
502
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
503
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
504
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
505
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
506
+
507
+
508
+ request_headers = {}
509
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
510
+
511
+ # Set Headers
512
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
513
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
514
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands'
515
+
516
+ request_url = @base_url || @client.base_url
517
+
518
+ options = {
519
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
520
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'subscriptionId' => @client.subscription_id},
521
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
522
+ headers: request_headers.merge(custom_headers || {}),
523
+ base_url: request_url
524
+ }
525
+ promise = @client.make_request_async(:get, path_template, options)
526
+
527
+ promise = promise.then do |result|
528
+ http_response = result.response
529
+ status_code = http_response.status
530
+ response_content = http_response.body
531
+ unless status_code == 200
532
+ error_model = JSON.load(response_content)
533
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
534
+ end
535
+
536
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
537
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
538
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
539
+ # Deserialize Response
540
+ if status_code == 200
541
+ begin
542
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
543
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommandsListResult.mapper()
544
+ result.body = @client.deserialize(result_mapper, parsed_response)
545
+ rescue Exception => e
546
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
547
+ end
548
+ end
549
+
550
+ result
551
+ end
552
+
553
+ promise.execute
554
+ end
555
+
556
+ #
557
+ # The operation to create or update the run command.
558
+ #
559
+ # @param resource_group_name [String] The name of the resource group.
560
+ # @param vm_name [String] The name of the virtual machine where the run command
561
+ # should be created or updated.
562
+ # @param run_command_name [String] The name of the virtual machine run command.
563
+ # @param run_command [VirtualMachineRunCommand] Parameters supplied to the
564
+ # Create Virtual Machine RunCommand operation.
565
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
566
+ # will be added to the HTTP request.
567
+ #
568
+ # @return [VirtualMachineRunCommand] operation results.
569
+ #
570
+ def begin_create_or_update(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
571
+ response = begin_create_or_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers).value!
572
+ response.body unless response.nil?
573
+ end
574
+
575
+ #
576
+ # The operation to create or update the run command.
577
+ #
578
+ # @param resource_group_name [String] The name of the resource group.
579
+ # @param vm_name [String] The name of the virtual machine where the run command
580
+ # should be created or updated.
581
+ # @param run_command_name [String] The name of the virtual machine run command.
582
+ # @param run_command [VirtualMachineRunCommand] Parameters supplied to the
583
+ # Create Virtual Machine RunCommand operation.
584
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
585
+ # will be added to the HTTP request.
586
+ #
587
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
588
+ #
589
+ def begin_create_or_update_with_http_info(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
590
+ begin_create_or_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers).value!
591
+ end
592
+
593
+ #
594
+ # The operation to create or update the run command.
595
+ #
596
+ # @param resource_group_name [String] The name of the resource group.
597
+ # @param vm_name [String] The name of the virtual machine where the run command
598
+ # should be created or updated.
599
+ # @param run_command_name [String] The name of the virtual machine run command.
600
+ # @param run_command [VirtualMachineRunCommand] Parameters supplied to the
601
+ # Create Virtual Machine RunCommand operation.
602
+ # @param [Hash{String => String}] A hash of custom headers that will be added
603
+ # to the HTTP request.
604
+ #
605
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
606
+ #
607
+ def begin_create_or_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
608
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
609
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
610
+ fail ArgumentError, 'run_command_name is nil' if run_command_name.nil?
611
+ fail ArgumentError, 'run_command is nil' if run_command.nil?
612
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
613
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
614
+
615
+
616
+ request_headers = {}
617
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
618
+
619
+ # Set Headers
620
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
621
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
622
+
623
+ # Serialize Request
624
+ request_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
625
+ request_content = @client.serialize(request_mapper, run_command)
626
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
627
+
628
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'
629
+
630
+ request_url = @base_url || @client.base_url
631
+
632
+ options = {
633
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
634
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'runCommandName' => run_command_name,'subscriptionId' => @client.subscription_id},
635
+ query_params: {'api-version' => @client.api_version},
636
+ body: request_content,
637
+ headers: request_headers.merge(custom_headers || {}),
638
+ base_url: request_url
639
+ }
640
+ promise = @client.make_request_async(:put, path_template, options)
641
+
642
+ promise = promise.then do |result|
643
+ http_response = result.response
644
+ status_code = http_response.status
645
+ response_content = http_response.body
646
+ unless status_code == 200 || status_code == 201
647
+ error_model = JSON.load(response_content)
648
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
649
+ end
650
+
651
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
652
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
653
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
654
+ # Deserialize Response
655
+ if status_code == 200
656
+ begin
657
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
658
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
659
+ result.body = @client.deserialize(result_mapper, parsed_response)
660
+ rescue Exception => e
661
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
662
+ end
663
+ end
664
+ # Deserialize Response
665
+ if status_code == 201
666
+ begin
667
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
668
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
669
+ result.body = @client.deserialize(result_mapper, parsed_response)
670
+ rescue Exception => e
671
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
672
+ end
673
+ end
674
+
675
+ result
676
+ end
677
+
678
+ promise.execute
679
+ end
680
+
681
+ #
682
+ # The operation to update the run command.
683
+ #
684
+ # @param resource_group_name [String] The name of the resource group.
685
+ # @param vm_name [String] The name of the virtual machine where the run command
686
+ # should be updated.
687
+ # @param run_command_name [String] The name of the virtual machine run command.
688
+ # @param run_command [VirtualMachineRunCommandUpdate] Parameters supplied to
689
+ # the Update Virtual Machine RunCommand operation.
690
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
691
+ # will be added to the HTTP request.
692
+ #
693
+ # @return [VirtualMachineRunCommand] operation results.
694
+ #
695
+ def begin_update(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
696
+ response = begin_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers).value!
697
+ response.body unless response.nil?
698
+ end
699
+
700
+ #
701
+ # The operation to update the run command.
702
+ #
703
+ # @param resource_group_name [String] The name of the resource group.
704
+ # @param vm_name [String] The name of the virtual machine where the run command
705
+ # should be updated.
706
+ # @param run_command_name [String] The name of the virtual machine run command.
707
+ # @param run_command [VirtualMachineRunCommandUpdate] Parameters supplied to
708
+ # the Update Virtual Machine RunCommand operation.
709
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
710
+ # will be added to the HTTP request.
711
+ #
712
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
713
+ #
714
+ def begin_update_with_http_info(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
715
+ begin_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:custom_headers).value!
716
+ end
717
+
718
+ #
719
+ # The operation to update the run command.
720
+ #
721
+ # @param resource_group_name [String] The name of the resource group.
722
+ # @param vm_name [String] The name of the virtual machine where the run command
723
+ # should be updated.
724
+ # @param run_command_name [String] The name of the virtual machine run command.
725
+ # @param run_command [VirtualMachineRunCommandUpdate] Parameters supplied to
726
+ # the Update Virtual Machine RunCommand operation.
727
+ # @param [Hash{String => String}] A hash of custom headers that will be added
728
+ # to the HTTP request.
729
+ #
730
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
731
+ #
732
+ def begin_update_async(resource_group_name, vm_name, run_command_name, run_command, custom_headers:nil)
733
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
734
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
735
+ fail ArgumentError, 'run_command_name is nil' if run_command_name.nil?
736
+ fail ArgumentError, 'run_command is nil' if run_command.nil?
737
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
738
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
739
+
740
+
741
+ request_headers = {}
742
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
743
+
744
+ # Set Headers
745
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
746
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
747
+
748
+ # Serialize Request
749
+ request_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommandUpdate.mapper()
750
+ request_content = @client.serialize(request_mapper, run_command)
751
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
752
+
753
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'
754
+
755
+ request_url = @base_url || @client.base_url
756
+
757
+ options = {
758
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
759
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'runCommandName' => run_command_name,'subscriptionId' => @client.subscription_id},
760
+ query_params: {'api-version' => @client.api_version},
761
+ body: request_content,
762
+ headers: request_headers.merge(custom_headers || {}),
763
+ base_url: request_url
764
+ }
765
+ promise = @client.make_request_async(:patch, path_template, options)
766
+
767
+ promise = promise.then do |result|
768
+ http_response = result.response
769
+ status_code = http_response.status
770
+ response_content = http_response.body
771
+ unless status_code == 200
772
+ error_model = JSON.load(response_content)
773
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
774
+ end
775
+
776
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
777
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
778
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
779
+ # Deserialize Response
780
+ if status_code == 200
781
+ begin
782
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
783
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommand.mapper()
784
+ result.body = @client.deserialize(result_mapper, parsed_response)
785
+ rescue Exception => e
786
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
787
+ end
788
+ end
789
+
790
+ result
791
+ end
792
+
793
+ promise.execute
794
+ end
795
+
796
+ #
797
+ # The operation to delete the run command.
798
+ #
799
+ # @param resource_group_name [String] The name of the resource group.
800
+ # @param vm_name [String] The name of the virtual machine where the run command
801
+ # should be deleted.
802
+ # @param run_command_name [String] The name of the virtual machine run command.
803
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
804
+ # will be added to the HTTP request.
805
+ #
806
+ #
807
+ def begin_delete(resource_group_name, vm_name, run_command_name, custom_headers:nil)
808
+ response = begin_delete_async(resource_group_name, vm_name, run_command_name, custom_headers:custom_headers).value!
809
+ nil
810
+ end
811
+
812
+ #
813
+ # The operation to delete the run command.
814
+ #
815
+ # @param resource_group_name [String] The name of the resource group.
816
+ # @param vm_name [String] The name of the virtual machine where the run command
817
+ # should be deleted.
818
+ # @param run_command_name [String] The name of the virtual machine run command.
819
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
820
+ # will be added to the HTTP request.
821
+ #
822
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
823
+ #
824
+ def begin_delete_with_http_info(resource_group_name, vm_name, run_command_name, custom_headers:nil)
825
+ begin_delete_async(resource_group_name, vm_name, run_command_name, custom_headers:custom_headers).value!
826
+ end
827
+
828
+ #
829
+ # The operation to delete the run command.
830
+ #
831
+ # @param resource_group_name [String] The name of the resource group.
832
+ # @param vm_name [String] The name of the virtual machine where the run command
833
+ # should be deleted.
834
+ # @param run_command_name [String] The name of the virtual machine run command.
835
+ # @param [Hash{String => String}] A hash of custom headers that will be added
836
+ # to the HTTP request.
837
+ #
838
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
839
+ #
840
+ def begin_delete_async(resource_group_name, vm_name, run_command_name, custom_headers:nil)
841
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
842
+ fail ArgumentError, 'vm_name is nil' if vm_name.nil?
843
+ fail ArgumentError, 'run_command_name is nil' if run_command_name.nil?
844
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
845
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
846
+
847
+
848
+ request_headers = {}
849
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
850
+
851
+ # Set Headers
852
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
853
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
854
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'
855
+
856
+ request_url = @base_url || @client.base_url
857
+
858
+ options = {
859
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
860
+ path_params: {'resourceGroupName' => resource_group_name,'vmName' => vm_name,'runCommandName' => run_command_name,'subscriptionId' => @client.subscription_id},
861
+ query_params: {'api-version' => @client.api_version},
862
+ headers: request_headers.merge(custom_headers || {}),
863
+ base_url: request_url
864
+ }
865
+ promise = @client.make_request_async(:delete, path_template, options)
866
+
867
+ promise = promise.then do |result|
868
+ http_response = result.response
869
+ status_code = http_response.status
870
+ response_content = http_response.body
871
+ unless status_code == 200 || status_code == 202 || status_code == 204
872
+ error_model = JSON.load(response_content)
873
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
874
+ end
875
+
876
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
877
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
878
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
879
+
880
+ result
881
+ end
882
+
883
+ promise.execute
884
+ end
885
+
886
+ #
887
+ # Lists all available run commands for a subscription in a location.
888
+ #
889
+ # @param next_page_link [String] The NextLink from the previous successful call
890
+ # to List operation.
891
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
892
+ # will be added to the HTTP request.
893
+ #
894
+ # @return [RunCommandListResult] operation results.
895
+ #
896
+ def list_next(next_page_link, custom_headers:nil)
897
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
898
+ response.body unless response.nil?
899
+ end
900
+
901
+ #
902
+ # Lists all available run commands for a subscription in a location.
903
+ #
904
+ # @param next_page_link [String] The NextLink from the previous successful call
905
+ # to List operation.
906
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
907
+ # will be added to the HTTP request.
908
+ #
909
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
910
+ #
911
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
912
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
913
+ end
914
+
915
+ #
916
+ # Lists all available run commands for a subscription in a location.
917
+ #
918
+ # @param next_page_link [String] The NextLink from the previous successful call
919
+ # to List operation.
920
+ # @param [Hash{String => String}] A hash of custom headers that will be added
921
+ # to the HTTP request.
922
+ #
923
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
924
+ #
925
+ def list_next_async(next_page_link, custom_headers:nil)
926
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
927
+
928
+
929
+ request_headers = {}
930
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
931
+
932
+ # Set Headers
933
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
934
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
935
+ path_template = '{nextLink}'
936
+
937
+ request_url = @base_url || @client.base_url
938
+
939
+ options = {
940
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
941
+ skip_encoding_path_params: {'nextLink' => next_page_link},
942
+ headers: request_headers.merge(custom_headers || {}),
943
+ base_url: request_url
944
+ }
945
+ promise = @client.make_request_async(:get, path_template, options)
946
+
947
+ promise = promise.then do |result|
948
+ http_response = result.response
949
+ status_code = http_response.status
950
+ response_content = http_response.body
951
+ unless status_code == 200
952
+ error_model = JSON.load(response_content)
953
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
954
+ end
955
+
956
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
957
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
958
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
959
+ # Deserialize Response
960
+ if status_code == 200
961
+ begin
962
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
963
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::RunCommandListResult.mapper()
964
+ result.body = @client.deserialize(result_mapper, parsed_response)
965
+ rescue Exception => e
966
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
967
+ end
968
+ end
969
+
970
+ result
971
+ end
972
+
973
+ promise.execute
974
+ end
975
+
976
+ #
977
+ # The operation to get all run commands of a Virtual Machine.
978
+ #
979
+ # @param next_page_link [String] The NextLink from the previous successful call
980
+ # to List operation.
981
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
982
+ # will be added to the HTTP request.
983
+ #
984
+ # @return [VirtualMachineRunCommandsListResult] operation results.
985
+ #
986
+ def list_by_virtual_machine_next(next_page_link, custom_headers:nil)
987
+ response = list_by_virtual_machine_next_async(next_page_link, custom_headers:custom_headers).value!
988
+ response.body unless response.nil?
989
+ end
990
+
991
+ #
992
+ # The operation to get all run commands of a Virtual Machine.
993
+ #
994
+ # @param next_page_link [String] The NextLink from the previous successful call
995
+ # to List operation.
996
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
997
+ # will be added to the HTTP request.
998
+ #
999
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1000
+ #
1001
+ def list_by_virtual_machine_next_with_http_info(next_page_link, custom_headers:nil)
1002
+ list_by_virtual_machine_next_async(next_page_link, custom_headers:custom_headers).value!
1003
+ end
1004
+
1005
+ #
1006
+ # The operation to get all run commands of a Virtual Machine.
1007
+ #
1008
+ # @param next_page_link [String] The NextLink from the previous successful call
1009
+ # to List operation.
1010
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1011
+ # to the HTTP request.
1012
+ #
1013
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1014
+ #
1015
+ def list_by_virtual_machine_next_async(next_page_link, custom_headers:nil)
1016
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1017
+
1018
+
1019
+ request_headers = {}
1020
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1021
+
1022
+ # Set Headers
1023
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1024
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1025
+ path_template = '{nextLink}'
1026
+
1027
+ request_url = @base_url || @client.base_url
1028
+
1029
+ options = {
1030
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1031
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1032
+ headers: request_headers.merge(custom_headers || {}),
1033
+ base_url: request_url
1034
+ }
1035
+ promise = @client.make_request_async(:get, path_template, options)
1036
+
1037
+ promise = promise.then do |result|
1038
+ http_response = result.response
1039
+ status_code = http_response.status
1040
+ response_content = http_response.body
1041
+ unless status_code == 200
1042
+ error_model = JSON.load(response_content)
1043
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1044
+ end
1045
+
1046
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1047
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1048
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1049
+ # Deserialize Response
1050
+ if status_code == 200
1051
+ begin
1052
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1053
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::VirtualMachineRunCommandsListResult.mapper()
1054
+ result.body = @client.deserialize(result_mapper, parsed_response)
1055
+ rescue Exception => e
1056
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1057
+ end
1058
+ end
1059
+
1060
+ result
1061
+ end
1062
+
1063
+ promise.execute
1064
+ end
1065
+
1066
+ #
1067
+ # Lists all available run commands for a subscription in a location.
1068
+ #
1069
+ # @param location [String] The location upon which run commands is queried.
1070
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1071
+ # will be added to the HTTP request.
1072
+ #
1073
+ # @return [RunCommandListResult] which provide lazy access to pages of the
1074
+ # response.
1075
+ #
1076
+ def list_as_lazy(location, custom_headers:nil)
1077
+ response = list_async(location, custom_headers:custom_headers).value!
1078
+ unless response.nil?
1079
+ page = response.body
1080
+ page.next_method = Proc.new do |next_page_link|
1081
+ list_next_async(next_page_link, custom_headers:custom_headers)
1082
+ end
1083
+ page
1084
+ end
1085
+ end
1086
+
1087
+ #
1088
+ # The operation to get all run commands of a Virtual Machine.
1089
+ #
1090
+ # @param resource_group_name [String] The name of the resource group.
1091
+ # @param vm_name [String] The name of the virtual machine containing the run
1092
+ # command.
1093
+ # @param expand [String] The expand expression to apply on the operation.
1094
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1095
+ # will be added to the HTTP request.
1096
+ #
1097
+ # @return [VirtualMachineRunCommandsListResult] which provide lazy access to
1098
+ # pages of the response.
1099
+ #
1100
+ def list_by_virtual_machine_as_lazy(resource_group_name, vm_name, expand:nil, custom_headers:nil)
1101
+ response = list_by_virtual_machine_async(resource_group_name, vm_name, expand:expand, custom_headers:custom_headers).value!
1102
+ unless response.nil?
1103
+ page = response.body
1104
+ page.next_method = Proc.new do |next_page_link|
1105
+ list_by_virtual_machine_next_async(next_page_link, custom_headers:custom_headers)
1106
+ end
1107
+ page
1108
+ end
1109
+ end
1110
+
1111
+ end
1112
+ end