azure_mgmt_compute 0.19.3 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (337) 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/availability_sets.rb +4 -0
  18. data/lib/2019-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  19. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_artifact_version_source.rb +1 -1
  20. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine.rb +2 -2
  21. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +2 -2
  22. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +2 -2
  23. data/lib/2019-12-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +2 -2
  24. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +28 -8
  25. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +8 -6
  26. data/lib/2020-06-01/generated/azure_mgmt_compute.rb +276 -0
  27. data/lib/2020-06-01/generated/azure_mgmt_compute/availability_sets.rb +920 -0
  28. data/lib/2020-06-01/generated/azure_mgmt_compute/compute_management_client.rb +212 -0
  29. data/lib/2020-06-01/generated/azure_mgmt_compute/dedicated_host_groups.rb +861 -0
  30. data/lib/2020-06-01/generated/azure_mgmt_compute/dedicated_hosts.rb +806 -0
  31. data/lib/2020-06-01/generated/azure_mgmt_compute/images.rb +975 -0
  32. data/lib/2020-06-01/generated/azure_mgmt_compute/log_analytics.rb +341 -0
  33. data/lib/2020-06-01/generated/azure_mgmt_compute/models/additional_capabilities.rb +51 -0
  34. data/lib/2020-06-01/generated/azure_mgmt_compute/models/additional_unattend_content.rb +93 -0
  35. data/lib/2020-06-01/generated/azure_mgmt_compute/models/api_entity_reference.rb +47 -0
  36. data/lib/2020-06-01/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  37. data/lib/2020-06-01/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  38. data/lib/2020-06-01/generated/azure_mgmt_compute/models/automatic_osupgrade_policy.rb +63 -0
  39. data/lib/2020-06-01/generated/azure_mgmt_compute/models/automatic_osupgrade_properties.rb +47 -0
  40. data/lib/2020-06-01/generated/azure_mgmt_compute/models/automatic_repairs_policy.rb +64 -0
  41. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set.rb +189 -0
  42. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set_list_result.rb +100 -0
  43. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set_sku_types.rb +16 -0
  44. data/lib/2020-06-01/generated/azure_mgmt_compute/models/availability_set_update.rb +142 -0
  45. data/lib/2020-06-01/generated/azure_mgmt_compute/models/available_patch_summary.rb +143 -0
  46. data/lib/2020-06-01/generated/azure_mgmt_compute/models/billing_profile.rb +60 -0
  47. data/lib/2020-06-01/generated/azure_mgmt_compute/models/boot_diagnostics.rb +63 -0
  48. data/lib/2020-06-01/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +78 -0
  49. data/lib/2020-06-01/generated/azure_mgmt_compute/models/caching_types.rb +17 -0
  50. data/lib/2020-06-01/generated/azure_mgmt_compute/models/component_names.rb +15 -0
  51. data/lib/2020-06-01/generated/azure_mgmt_compute/models/compute_operation_list_result.rb +56 -0
  52. data/lib/2020-06-01/generated/azure_mgmt_compute/models/compute_operation_value.rb +108 -0
  53. data/lib/2020-06-01/generated/azure_mgmt_compute/models/data_disk.rb +201 -0
  54. data/lib/2020-06-01/generated/azure_mgmt_compute/models/data_disk_image.rb +49 -0
  55. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host.rb +219 -0
  56. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_allocatable_vm.rb +60 -0
  57. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_available_capacity.rb +57 -0
  58. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group.rb +178 -0
  59. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_instance_view.rb +57 -0
  60. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_list_result.rb +100 -0
  61. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_update.rb +141 -0
  62. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view.rb +81 -0
  63. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_instance_view_with_name.rb +84 -0
  64. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_license_types.rb +17 -0
  65. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_list_result.rb +100 -0
  66. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_update.rb +171 -0
  67. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diagnostics_profile.rb +52 -0
  68. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diff_disk_options.rb +15 -0
  69. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diff_disk_placement.rb +16 -0
  70. data/lib/2020-06-01/generated/azure_mgmt_compute/models/diff_disk_settings.rb +69 -0
  71. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disallowed_configuration.rb +47 -0
  72. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_create_option_types.rb +17 -0
  73. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_encryption_set_parameters.rb +46 -0
  74. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +73 -0
  75. data/lib/2020-06-01/generated/azure_mgmt_compute/models/disk_instance_view.rb +87 -0
  76. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hardware_profile.rb +104 -0
  77. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hyper_vgeneration_type.rb +16 -0
  78. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hyper_vgeneration_types.rb +16 -0
  79. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image.rb +139 -0
  80. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_data_disk.rb +108 -0
  81. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_disk.rb +126 -0
  82. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_list_result.rb +99 -0
  83. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_osdisk.rb +123 -0
  84. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_reference.rb +114 -0
  85. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_storage_profile.rb +86 -0
  86. data/lib/2020-06-01/generated/azure_mgmt_compute/models/image_update.rb +102 -0
  87. data/lib/2020-06-01/generated/azure_mgmt_compute/models/in_guest_patch_mode.rb +17 -0
  88. data/lib/2020-06-01/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  89. data/lib/2020-06-01/generated/azure_mgmt_compute/models/instance_view_status.rb +93 -0
  90. data/lib/2020-06-01/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  91. data/lib/2020-06-01/generated/azure_mgmt_compute/models/interval_in_mins.rb +18 -0
  92. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ipversion.rb +16 -0
  93. data/lib/2020-06-01/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +59 -0
  94. data/lib/2020-06-01/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +59 -0
  95. data/lib/2020-06-01/generated/azure_mgmt_compute/models/last_patch_installation_summary.rb +211 -0
  96. data/lib/2020-06-01/generated/azure_mgmt_compute/models/linux_configuration.rb +81 -0
  97. data/lib/2020-06-01/generated/azure_mgmt_compute/models/list_usages_result.rb +100 -0
  98. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +102 -0
  99. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_operation_result.rb +48 -0
  100. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_output.rb +47 -0
  101. data/lib/2020-06-01/generated/azure_mgmt_compute/models/maintenance_operation_result_code_types.rb +18 -0
  102. data/lib/2020-06-01/generated/azure_mgmt_compute/models/maintenance_redeploy_status.rb +115 -0
  103. data/lib/2020-06-01/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +70 -0
  104. data/lib/2020-06-01/generated/azure_mgmt_compute/models/network_interface_reference.rb +55 -0
  105. data/lib/2020-06-01/generated/azure_mgmt_compute/models/network_profile.rb +57 -0
  106. data/lib/2020-06-01/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  107. data/lib/2020-06-01/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  108. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_names.rb +16 -0
  109. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_state.rb +17 -0
  110. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_state_action.rb +16 -0
  111. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_state_input.rb +59 -0
  112. data/lib/2020-06-01/generated/azure_mgmt_compute/models/orchestration_service_summary.rb +61 -0
  113. data/lib/2020-06-01/generated/azure_mgmt_compute/models/osdisk.rb +191 -0
  114. data/lib/2020-06-01/generated/azure_mgmt_compute/models/osdisk_image.rb +48 -0
  115. data/lib/2020-06-01/generated/azure_mgmt_compute/models/osprofile.rb +204 -0
  116. data/lib/2020-06-01/generated/azure_mgmt_compute/models/pass_names.rb +15 -0
  117. data/lib/2020-06-01/generated/azure_mgmt_compute/models/patch_assessment_state.rb +20 -0
  118. data/lib/2020-06-01/generated/azure_mgmt_compute/models/patch_operation_status.rb +18 -0
  119. data/lib/2020-06-01/generated/azure_mgmt_compute/models/patch_settings.rb +59 -0
  120. data/lib/2020-06-01/generated/azure_mgmt_compute/models/plan.rb +86 -0
  121. data/lib/2020-06-01/generated/azure_mgmt_compute/models/protocol_types.rb +16 -0
  122. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group.rb +180 -0
  123. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_list_result.rb +100 -0
  124. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_type.rb +16 -0
  125. data/lib/2020-06-01/generated/azure_mgmt_compute/models/proximity_placement_group_update.rb +51 -0
  126. data/lib/2020-06-01/generated/azure_mgmt_compute/models/purchase_plan.rb +71 -0
  127. data/lib/2020-06-01/generated/azure_mgmt_compute/models/reboot_status.rb +19 -0
  128. data/lib/2020-06-01/generated/azure_mgmt_compute/models/recovery_walk_response.rb +60 -0
  129. data/lib/2020-06-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +97 -0
  130. data/lib/2020-06-01/generated/azure_mgmt_compute/models/resource.rb +110 -0
  131. data/lib/2020-06-01/generated/azure_mgmt_compute/models/resource_identity_type.rb +18 -0
  132. data/lib/2020-06-01/generated/azure_mgmt_compute/models/retrieve_boot_diagnostics_data_result.rb +59 -0
  133. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rollback_status_info.rb +74 -0
  134. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_action_type.rb +16 -0
  135. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_policy.rb +108 -0
  136. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_progress_info.rb +88 -0
  137. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_running_status.rb +88 -0
  138. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_code.rb +18 -0
  139. data/lib/2020-06-01/generated/azure_mgmt_compute/models/rolling_upgrade_status_info.rb +141 -0
  140. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_document.rb +116 -0
  141. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_document_base.rb +92 -0
  142. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_input.rb +87 -0
  143. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_input_parameter.rb +57 -0
  144. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_list_result.rb +100 -0
  145. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_parameter_definition.rb +81 -0
  146. data/lib/2020-06-01/generated/azure_mgmt_compute/models/run_command_result.rb +56 -0
  147. data/lib/2020-06-01/generated/azure_mgmt_compute/models/scale_in_policy.rb +71 -0
  148. data/lib/2020-06-01/generated/azure_mgmt_compute/models/scheduled_events_profile.rb +49 -0
  149. data/lib/2020-06-01/generated/azure_mgmt_compute/models/security_profile.rb +52 -0
  150. data/lib/2020-06-01/generated/azure_mgmt_compute/models/setting_names.rb +16 -0
  151. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sku.rb +73 -0
  152. data/lib/2020-06-01/generated/azure_mgmt_compute/models/software_update_reboot_behavior.rb +17 -0
  153. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_configuration.rb +56 -0
  154. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +64 -0
  155. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key_generate_key_pair_result.rb +73 -0
  156. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key_resource.rb +102 -0
  157. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key_update_resource.rb +67 -0
  158. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_keys_group_list_result.rb +100 -0
  159. data/lib/2020-06-01/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  160. data/lib/2020-06-01/generated/azure_mgmt_compute/models/storage_account_types.rb +18 -0
  161. data/lib/2020-06-01/generated/azure_mgmt_compute/models/storage_profile.rb +89 -0
  162. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  163. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +48 -0
  164. data/lib/2020-06-01/generated/azure_mgmt_compute/models/sub_resource_with_colocation_status.rb +57 -0
  165. data/lib/2020-06-01/generated/azure_mgmt_compute/models/terminate_notification_profile.rb +62 -0
  166. data/lib/2020-06-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +83 -0
  167. data/lib/2020-06-01/generated/azure_mgmt_compute/models/update_resource.rb +54 -0
  168. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_mode.rb +17 -0
  169. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info.rb +73 -0
  170. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_historical_status_info_properties.rb +116 -0
  171. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_history_status.rb +74 -0
  172. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_operation_invoker.rb +17 -0
  173. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_policy.rb +79 -0
  174. data/lib/2020-06-01/generated/azure_mgmt_compute/models/upgrade_state.rb +18 -0
  175. data/lib/2020-06-01/generated/azure_mgmt_compute/models/usage.rb +83 -0
  176. data/lib/2020-06-01/generated/azure_mgmt_compute/models/usage_name.rb +57 -0
  177. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vault_certificate.rb +72 -0
  178. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vault_secret_group.rb +69 -0
  179. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +46 -0
  180. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine.rb +454 -0
  181. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +87 -0
  182. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_assess_patches_result.rb +152 -0
  183. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +69 -0
  184. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +99 -0
  185. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_eviction_policy_types.rb +16 -0
  186. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +208 -0
  187. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +71 -0
  188. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +146 -0
  189. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +109 -0
  190. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extension_update.rb +147 -0
  191. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_extensions_list_result.rb +55 -0
  192. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_health_status.rb +48 -0
  193. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity.rb +102 -0
  194. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_identity_user_assigned_identities_value.rb +61 -0
  195. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_image.rb +155 -0
  196. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +87 -0
  197. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +258 -0
  198. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +99 -0
  199. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_patch_status.rb +61 -0
  200. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_priority_types.rb +17 -0
  201. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_reimage_parameters.rb +49 -0
  202. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +332 -0
  203. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +153 -0
  204. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +197 -0
  205. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_list_result.rb +103 -0
  206. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +70 -0
  207. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_update.rb +198 -0
  208. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity.rb +105 -0
  209. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_identity_user_assigned_identities_value.rb +61 -0
  210. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +113 -0
  211. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +59 -0
  212. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ip_tag.rb +58 -0
  213. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +195 -0
  214. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_osupgrade_history.rb +104 -0
  215. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +100 -0
  216. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +101 -0
  217. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +102 -0
  218. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +63 -0
  219. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +137 -0
  220. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_dns_settings.rb +56 -0
  221. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +71 -0
  222. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +180 -0
  223. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +167 -0
  224. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration.rb +120 -0
  225. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_public_ipaddress_configuration_dns_settings.rb +51 -0
  226. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_reimage_parameters.rb +65 -0
  227. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_scale_in_rules.rb +17 -0
  228. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +74 -0
  229. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +85 -0
  230. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +16 -0
  231. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +91 -0
  232. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update.rb +210 -0
  233. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_ipconfiguration.rb +190 -0
  234. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +136 -0
  235. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_profile.rb +72 -0
  236. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osdisk.rb +122 -0
  237. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_osprofile.rb +92 -0
  238. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_public_ipaddress_configuration.rb +72 -0
  239. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_storage_profile.rb +80 -0
  240. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_vmprofile.rb +151 -0
  241. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +397 -0
  242. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +70 -0
  243. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +57 -0
  244. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +55 -0
  245. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +211 -0
  246. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +101 -0
  247. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmnetwork_profile_configuration.rb +57 -0
  248. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +189 -0
  249. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprotection_policy.rb +60 -0
  250. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmreimage_parameters.rb +44 -0
  251. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_size.rb +106 -0
  252. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +55 -0
  253. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +180 -0
  254. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_software_patch_properties.rb +173 -0
  255. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +61 -0
  256. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +397 -0
  257. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vm_disk_types.rb +16 -0
  258. data/lib/2020-06-01/generated/azure_mgmt_compute/models/vmscale_set_convert_to_single_placement_group_input.rb +52 -0
  259. data/lib/2020-06-01/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +56 -0
  260. data/lib/2020-06-01/generated/azure_mgmt_compute/models/win_rmlistener.rb +67 -0
  261. data/lib/2020-06-01/generated/azure_mgmt_compute/models/windows_configuration.rb +127 -0
  262. data/lib/2020-06-01/generated/azure_mgmt_compute/module_definition.rb +9 -0
  263. data/lib/2020-06-01/generated/azure_mgmt_compute/operations.rb +109 -0
  264. data/lib/2020-06-01/generated/azure_mgmt_compute/proximity_placement_groups.rb +846 -0
  265. data/lib/2020-06-01/generated/azure_mgmt_compute/ssh_public_keys.rb +939 -0
  266. data/lib/2020-06-01/generated/azure_mgmt_compute/usage_operations.rb +241 -0
  267. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +360 -0
  268. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_extensions.rb +701 -0
  269. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_images.rb +600 -0
  270. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +322 -0
  271. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_extensions.rb +821 -0
  272. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_rolling_upgrades.rb +498 -0
  273. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmextensions.rb +709 -0
  274. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +2220 -0
  275. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +3290 -0
  276. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_sizes.rb +122 -0
  277. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machines.rb +3302 -0
  278. data/lib/2020-06-30/generated/azure_mgmt_compute.rb +80 -0
  279. data/lib/2020-06-30/generated/azure_mgmt_compute/compute_management_client.rb +145 -0
  280. data/lib/2020-06-30/generated/azure_mgmt_compute/disk_accesses.rb +1120 -0
  281. data/lib/2020-06-30/generated/azure_mgmt_compute/disk_encryption_sets.rb +1236 -0
  282. data/lib/2020-06-30/generated/azure_mgmt_compute/disks.rb +1294 -0
  283. data/lib/2020-06-30/generated/azure_mgmt_compute/models/access_level.rb +17 -0
  284. data/lib/2020-06-30/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
  285. data/lib/2020-06-30/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  286. data/lib/2020-06-30/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  287. data/lib/2020-06-30/generated/azure_mgmt_compute/models/creation_data.rb +150 -0
  288. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk.rb +422 -0
  289. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_access.rb +133 -0
  290. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_access_list.rb +100 -0
  291. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_access_update.rb +54 -0
  292. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_create_option.rb +21 -0
  293. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set.rb +160 -0
  294. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_identity_type.rb +15 -0
  295. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_list.rb +100 -0
  296. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_type.rb +16 -0
  297. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_update.rb +79 -0
  298. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
  299. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_sku.rb +61 -0
  300. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_state.rb +20 -0
  301. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
  302. data/lib/2020-06-30/generated/azure_mgmt_compute/models/disk_update.rb +225 -0
  303. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption.rb +60 -0
  304. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_set_identity.rb +78 -0
  305. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb +85 -0
  306. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb +62 -0
  307. data/lib/2020-06-30/generated/azure_mgmt_compute/models/encryption_type.rb +17 -0
  308. data/lib/2020-06-30/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
  309. data/lib/2020-06-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  310. data/lib/2020-06-30/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
  311. data/lib/2020-06-30/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  312. data/lib/2020-06-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
  313. data/lib/2020-06-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
  314. data/lib/2020-06-30/generated/azure_mgmt_compute/models/network_access_policy.rb +17 -0
  315. data/lib/2020-06-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  316. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint.rb +47 -0
  317. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_connection.rb +110 -0
  318. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_connection_provisioning_state.rb +18 -0
  319. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_service_connection_status.rb +17 -0
  320. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_link_resource.rb +123 -0
  321. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_link_resource_list_result.rb +55 -0
  322. data/lib/2020-06-30/generated/azure_mgmt_compute/models/private_link_service_connection_state.rb +72 -0
  323. data/lib/2020-06-30/generated/azure_mgmt_compute/models/resource.rb +110 -0
  324. data/lib/2020-06-30/generated/azure_mgmt_compute/models/resource_uri_list.rb +100 -0
  325. data/lib/2020-06-30/generated/azure_mgmt_compute/models/share_info_element.rb +49 -0
  326. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot.rb +290 -0
  327. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
  328. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_sku.rb +60 -0
  329. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
  330. data/lib/2020-06-30/generated/azure_mgmt_compute/models/snapshot_update.rb +145 -0
  331. data/lib/2020-06-30/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
  332. data/lib/2020-06-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
  333. data/lib/2020-06-30/generated/azure_mgmt_compute/snapshots.rb +1294 -0
  334. data/lib/azure_mgmt_compute.rb +15 -13
  335. data/lib/profiles/latest/modules/compute_profile_module.rb +961 -805
  336. data/lib/version.rb +1 -1
  337. metadata +311 -3
@@ -0,0 +1,1294 @@
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_30
7
+ #
8
+ # Compute Client
9
+ #
10
+ class Disks
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Disks 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
+ # Creates or updates a disk.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param disk_name [String] The name of the managed disk that is being created.
29
+ # The name can't be changed after the disk is created. Supported characters for
30
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
31
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
32
+ # operation.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [Disk] operation results.
37
+ #
38
+ def create_or_update(resource_group_name, disk_name, disk, custom_headers:nil)
39
+ response = create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group.
45
+ # @param disk_name [String] The name of the managed disk that is being created.
46
+ # The name can't be changed after the disk is created. Supported characters for
47
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
48
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
49
+ # operation.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [Concurrent::Promise] promise which provides async access to http
54
+ # response.
55
+ #
56
+ def create_or_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
57
+ # Send request
58
+ promise = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers)
59
+
60
+ promise = promise.then do |response|
61
+ # Defining deserialization method.
62
+ deserialize_method = lambda do |parsed_response|
63
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
64
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
65
+ end
66
+
67
+ # Waiting for response.
68
+ @client.get_long_running_operation_result(response, deserialize_method)
69
+ end
70
+
71
+ promise
72
+ end
73
+
74
+ #
75
+ # Updates (patches) a disk.
76
+ #
77
+ # @param resource_group_name [String] The name of the resource group.
78
+ # @param disk_name [String] The name of the managed disk that is being created.
79
+ # The name can't be changed after the disk is created. Supported characters for
80
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
81
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
82
+ # operation.
83
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
84
+ # will be added to the HTTP request.
85
+ #
86
+ # @return [Disk] operation results.
87
+ #
88
+ def update(resource_group_name, disk_name, disk, custom_headers:nil)
89
+ response = update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
90
+ response.body unless response.nil?
91
+ end
92
+
93
+ #
94
+ # @param resource_group_name [String] The name of the resource group.
95
+ # @param disk_name [String] The name of the managed disk that is being created.
96
+ # The name can't be changed after the disk is created. Supported characters for
97
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
98
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
99
+ # operation.
100
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
101
+ # will be added to the HTTP request.
102
+ #
103
+ # @return [Concurrent::Promise] promise which provides async access to http
104
+ # response.
105
+ #
106
+ def update_async(resource_group_name, disk_name, disk, custom_headers:nil)
107
+ # Send request
108
+ promise = begin_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers)
109
+
110
+ promise = promise.then do |response|
111
+ # Defining deserialization method.
112
+ deserialize_method = lambda do |parsed_response|
113
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
114
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
115
+ end
116
+
117
+ # Waiting for response.
118
+ @client.get_long_running_operation_result(response, deserialize_method)
119
+ end
120
+
121
+ promise
122
+ end
123
+
124
+ #
125
+ # Gets information about a disk.
126
+ #
127
+ # @param resource_group_name [String] The name of the resource group.
128
+ # @param disk_name [String] The name of the managed disk that is being created.
129
+ # The name can't be changed after the disk is created. Supported characters for
130
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [Disk] operation results.
135
+ #
136
+ def get(resource_group_name, disk_name, custom_headers:nil)
137
+ response = get_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # Gets information about a disk.
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group.
145
+ # @param disk_name [String] The name of the managed disk that is being created.
146
+ # The name can't be changed after the disk is created. Supported characters for
147
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
152
+ #
153
+ def get_with_http_info(resource_group_name, disk_name, custom_headers:nil)
154
+ get_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
155
+ end
156
+
157
+ #
158
+ # Gets information about a disk.
159
+ #
160
+ # @param resource_group_name [String] The name of the resource group.
161
+ # @param disk_name [String] The name of the managed disk that is being created.
162
+ # The name can't be changed after the disk is created. Supported characters for
163
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
164
+ # @param [Hash{String => String}] A hash of custom headers that will be added
165
+ # to the HTTP request.
166
+ #
167
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
168
+ #
169
+ def get_async(resource_group_name, disk_name, custom_headers:nil)
170
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
171
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
172
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
173
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
174
+
175
+
176
+ request_headers = {}
177
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
189
+ query_params: {'api-version' => @client.api_version},
190
+ headers: request_headers.merge(custom_headers || {}),
191
+ base_url: request_url
192
+ }
193
+ promise = @client.make_request_async(:get, path_template, options)
194
+
195
+ promise = promise.then do |result|
196
+ http_response = result.response
197
+ status_code = http_response.status
198
+ response_content = http_response.body
199
+ unless status_code == 200
200
+ error_model = JSON.load(response_content)
201
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
202
+ end
203
+
204
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
205
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
206
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
207
+ # Deserialize Response
208
+ if status_code == 200
209
+ begin
210
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
211
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
212
+ result.body = @client.deserialize(result_mapper, parsed_response)
213
+ rescue Exception => e
214
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
215
+ end
216
+ end
217
+
218
+ result
219
+ end
220
+
221
+ promise.execute
222
+ end
223
+
224
+ #
225
+ # Deletes a disk.
226
+ #
227
+ # @param resource_group_name [String] The name of the resource group.
228
+ # @param disk_name [String] The name of the managed disk that is being created.
229
+ # The name can't be changed after the disk is created. Supported characters for
230
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ def delete(resource_group_name, disk_name, custom_headers:nil)
235
+ response = delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
236
+ nil
237
+ end
238
+
239
+ #
240
+ # @param resource_group_name [String] The name of the resource group.
241
+ # @param disk_name [String] The name of the managed disk that is being created.
242
+ # The name can't be changed after the disk is created. Supported characters for
243
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
244
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
245
+ # will be added to the HTTP request.
246
+ #
247
+ # @return [Concurrent::Promise] promise which provides async access to http
248
+ # response.
249
+ #
250
+ def delete_async(resource_group_name, disk_name, custom_headers:nil)
251
+ # Send request
252
+ promise = begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers)
253
+
254
+ promise = promise.then do |response|
255
+ # Defining deserialization method.
256
+ deserialize_method = lambda do |parsed_response|
257
+ end
258
+
259
+ # Waiting for response.
260
+ @client.get_long_running_operation_result(response, deserialize_method)
261
+ end
262
+
263
+ promise
264
+ end
265
+
266
+ #
267
+ # Lists all the disks under a resource group.
268
+ #
269
+ # @param resource_group_name [String] The name of the resource group.
270
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
271
+ # will be added to the HTTP request.
272
+ #
273
+ # @return [Array<Disk>] operation results.
274
+ #
275
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
276
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
277
+ first_page.get_all_items
278
+ end
279
+
280
+ #
281
+ # Lists all the disks under a resource group.
282
+ #
283
+ # @param resource_group_name [String] The name of the resource group.
284
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
285
+ # will be added to the HTTP request.
286
+ #
287
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
288
+ #
289
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
290
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
291
+ end
292
+
293
+ #
294
+ # Lists all the disks under a resource group.
295
+ #
296
+ # @param resource_group_name [String] The name of the resource group.
297
+ # @param [Hash{String => String}] A hash of custom headers that will be added
298
+ # to the HTTP request.
299
+ #
300
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
301
+ #
302
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
303
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
304
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
305
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
306
+
307
+
308
+ request_headers = {}
309
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
310
+
311
+ # Set Headers
312
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
313
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
314
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'
315
+
316
+ request_url = @base_url || @client.base_url
317
+
318
+ options = {
319
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
320
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
321
+ query_params: {'api-version' => @client.api_version},
322
+ headers: request_headers.merge(custom_headers || {}),
323
+ base_url: request_url
324
+ }
325
+ promise = @client.make_request_async(:get, path_template, options)
326
+
327
+ promise = promise.then do |result|
328
+ http_response = result.response
329
+ status_code = http_response.status
330
+ response_content = http_response.body
331
+ unless status_code == 200
332
+ error_model = JSON.load(response_content)
333
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
334
+ end
335
+
336
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
337
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
338
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
339
+ # Deserialize Response
340
+ if status_code == 200
341
+ begin
342
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
343
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskList.mapper()
344
+ result.body = @client.deserialize(result_mapper, parsed_response)
345
+ rescue Exception => e
346
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
347
+ end
348
+ end
349
+
350
+ result
351
+ end
352
+
353
+ promise.execute
354
+ end
355
+
356
+ #
357
+ # Lists all the disks under a subscription.
358
+ #
359
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
360
+ # will be added to the HTTP request.
361
+ #
362
+ # @return [Array<Disk>] operation results.
363
+ #
364
+ def list(custom_headers:nil)
365
+ first_page = list_as_lazy(custom_headers:custom_headers)
366
+ first_page.get_all_items
367
+ end
368
+
369
+ #
370
+ # Lists all the disks under a subscription.
371
+ #
372
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
373
+ # will be added to the HTTP request.
374
+ #
375
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
376
+ #
377
+ def list_with_http_info(custom_headers:nil)
378
+ list_async(custom_headers:custom_headers).value!
379
+ end
380
+
381
+ #
382
+ # Lists all the disks under a subscription.
383
+ #
384
+ # @param [Hash{String => String}] A hash of custom headers that will be added
385
+ # to the HTTP request.
386
+ #
387
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
388
+ #
389
+ def list_async(custom_headers:nil)
390
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
391
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
392
+
393
+
394
+ request_headers = {}
395
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
396
+
397
+ # Set Headers
398
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
399
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
400
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'
401
+
402
+ request_url = @base_url || @client.base_url
403
+
404
+ options = {
405
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
406
+ path_params: {'subscriptionId' => @client.subscription_id},
407
+ query_params: {'api-version' => @client.api_version},
408
+ headers: request_headers.merge(custom_headers || {}),
409
+ base_url: request_url
410
+ }
411
+ promise = @client.make_request_async(:get, path_template, options)
412
+
413
+ promise = promise.then do |result|
414
+ http_response = result.response
415
+ status_code = http_response.status
416
+ response_content = http_response.body
417
+ unless status_code == 200
418
+ error_model = JSON.load(response_content)
419
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
420
+ end
421
+
422
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
423
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
424
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
425
+ # Deserialize Response
426
+ if status_code == 200
427
+ begin
428
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
429
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskList.mapper()
430
+ result.body = @client.deserialize(result_mapper, parsed_response)
431
+ rescue Exception => e
432
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
433
+ end
434
+ end
435
+
436
+ result
437
+ end
438
+
439
+ promise.execute
440
+ end
441
+
442
+ #
443
+ # Grants access to a disk.
444
+ #
445
+ # @param resource_group_name [String] The name of the resource group.
446
+ # @param disk_name [String] The name of the managed disk that is being created.
447
+ # The name can't be changed after the disk is created. Supported characters for
448
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
449
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
450
+ # body of the get disk access operation.
451
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
452
+ # will be added to the HTTP request.
453
+ #
454
+ # @return [AccessUri] operation results.
455
+ #
456
+ def grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
457
+ response = grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
458
+ response.body unless response.nil?
459
+ end
460
+
461
+ #
462
+ # @param resource_group_name [String] The name of the resource group.
463
+ # @param disk_name [String] The name of the managed disk that is being created.
464
+ # The name can't be changed after the disk is created. Supported characters for
465
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
466
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
467
+ # body of the get disk access operation.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [Concurrent::Promise] promise which provides async access to http
472
+ # response.
473
+ #
474
+ def grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
475
+ # Send request
476
+ promise = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers)
477
+
478
+ promise = promise.then do |response|
479
+ # Defining deserialization method.
480
+ deserialize_method = lambda do |parsed_response|
481
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::AccessUri.mapper()
482
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
483
+ end
484
+
485
+ # Waiting for response.
486
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
487
+ end
488
+
489
+ promise
490
+ end
491
+
492
+ #
493
+ # Revokes access to a disk.
494
+ #
495
+ # @param resource_group_name [String] The name of the resource group.
496
+ # @param disk_name [String] The name of the managed disk that is being created.
497
+ # The name can't be changed after the disk is created. Supported characters for
498
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
499
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
500
+ # will be added to the HTTP request.
501
+ #
502
+ def revoke_access(resource_group_name, disk_name, custom_headers:nil)
503
+ response = revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
504
+ nil
505
+ end
506
+
507
+ #
508
+ # @param resource_group_name [String] The name of the resource group.
509
+ # @param disk_name [String] The name of the managed disk that is being created.
510
+ # The name can't be changed after the disk is created. Supported characters for
511
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
512
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
513
+ # will be added to the HTTP request.
514
+ #
515
+ # @return [Concurrent::Promise] promise which provides async access to http
516
+ # response.
517
+ #
518
+ def revoke_access_async(resource_group_name, disk_name, custom_headers:nil)
519
+ # Send request
520
+ promise = begin_revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers)
521
+
522
+ promise = promise.then do |response|
523
+ # Defining deserialization method.
524
+ deserialize_method = lambda do |parsed_response|
525
+ end
526
+
527
+ # Waiting for response.
528
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
529
+ end
530
+
531
+ promise
532
+ end
533
+
534
+ #
535
+ # Creates or updates a disk.
536
+ #
537
+ # @param resource_group_name [String] The name of the resource group.
538
+ # @param disk_name [String] The name of the managed disk that is being created.
539
+ # The name can't be changed after the disk is created. Supported characters for
540
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
541
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
542
+ # operation.
543
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
544
+ # will be added to the HTTP request.
545
+ #
546
+ # @return [Disk] operation results.
547
+ #
548
+ def begin_create_or_update(resource_group_name, disk_name, disk, custom_headers:nil)
549
+ response = begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
550
+ response.body unless response.nil?
551
+ end
552
+
553
+ #
554
+ # Creates or updates a disk.
555
+ #
556
+ # @param resource_group_name [String] The name of the resource group.
557
+ # @param disk_name [String] The name of the managed disk that is being created.
558
+ # The name can't be changed after the disk is created. Supported characters for
559
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
560
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
561
+ # operation.
562
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
563
+ # will be added to the HTTP request.
564
+ #
565
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
566
+ #
567
+ def begin_create_or_update_with_http_info(resource_group_name, disk_name, disk, custom_headers:nil)
568
+ begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
569
+ end
570
+
571
+ #
572
+ # Creates or updates a disk.
573
+ #
574
+ # @param resource_group_name [String] The name of the resource group.
575
+ # @param disk_name [String] The name of the managed disk that is being created.
576
+ # The name can't be changed after the disk is created. Supported characters for
577
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
578
+ # @param disk [Disk] Disk object supplied in the body of the Put disk
579
+ # operation.
580
+ # @param [Hash{String => String}] A hash of custom headers that will be added
581
+ # to the HTTP request.
582
+ #
583
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
584
+ #
585
+ def begin_create_or_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
586
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
587
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
588
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
589
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
590
+ fail ArgumentError, 'disk is nil' if disk.nil?
591
+
592
+
593
+ request_headers = {}
594
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
595
+
596
+ # Set Headers
597
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
598
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
599
+
600
+ # Serialize Request
601
+ request_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
602
+ request_content = @client.serialize(request_mapper, disk)
603
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
604
+
605
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
606
+
607
+ request_url = @base_url || @client.base_url
608
+
609
+ options = {
610
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
611
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
612
+ query_params: {'api-version' => @client.api_version},
613
+ body: request_content,
614
+ headers: request_headers.merge(custom_headers || {}),
615
+ base_url: request_url
616
+ }
617
+ promise = @client.make_request_async(:put, path_template, options)
618
+
619
+ promise = promise.then do |result|
620
+ http_response = result.response
621
+ status_code = http_response.status
622
+ response_content = http_response.body
623
+ unless status_code == 200 || status_code == 202
624
+ error_model = JSON.load(response_content)
625
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
626
+ end
627
+
628
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
629
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
630
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
631
+ # Deserialize Response
632
+ if status_code == 200
633
+ begin
634
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
635
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
636
+ result.body = @client.deserialize(result_mapper, parsed_response)
637
+ rescue Exception => e
638
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
639
+ end
640
+ end
641
+ # Deserialize Response
642
+ if status_code == 202
643
+ begin
644
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
645
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
646
+ result.body = @client.deserialize(result_mapper, parsed_response)
647
+ rescue Exception => e
648
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
649
+ end
650
+ end
651
+
652
+ result
653
+ end
654
+
655
+ promise.execute
656
+ end
657
+
658
+ #
659
+ # Updates (patches) a disk.
660
+ #
661
+ # @param resource_group_name [String] The name of the resource group.
662
+ # @param disk_name [String] The name of the managed disk that is being created.
663
+ # The name can't be changed after the disk is created. Supported characters for
664
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
665
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
666
+ # operation.
667
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
668
+ # will be added to the HTTP request.
669
+ #
670
+ # @return [Disk] operation results.
671
+ #
672
+ def begin_update(resource_group_name, disk_name, disk, custom_headers:nil)
673
+ response = begin_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
674
+ response.body unless response.nil?
675
+ end
676
+
677
+ #
678
+ # Updates (patches) a disk.
679
+ #
680
+ # @param resource_group_name [String] The name of the resource group.
681
+ # @param disk_name [String] The name of the managed disk that is being created.
682
+ # The name can't be changed after the disk is created. Supported characters for
683
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
684
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
685
+ # operation.
686
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
687
+ # will be added to the HTTP request.
688
+ #
689
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
690
+ #
691
+ def begin_update_with_http_info(resource_group_name, disk_name, disk, custom_headers:nil)
692
+ begin_update_async(resource_group_name, disk_name, disk, custom_headers:custom_headers).value!
693
+ end
694
+
695
+ #
696
+ # Updates (patches) a disk.
697
+ #
698
+ # @param resource_group_name [String] The name of the resource group.
699
+ # @param disk_name [String] The name of the managed disk that is being created.
700
+ # The name can't be changed after the disk is created. Supported characters for
701
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
702
+ # @param disk [DiskUpdate] Disk object supplied in the body of the Patch disk
703
+ # operation.
704
+ # @param [Hash{String => String}] A hash of custom headers that will be added
705
+ # to the HTTP request.
706
+ #
707
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
708
+ #
709
+ def begin_update_async(resource_group_name, disk_name, disk, custom_headers:nil)
710
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
711
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
712
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
713
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
714
+ fail ArgumentError, 'disk is nil' if disk.nil?
715
+
716
+
717
+ request_headers = {}
718
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
719
+
720
+ # Set Headers
721
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
722
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
723
+
724
+ # Serialize Request
725
+ request_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskUpdate.mapper()
726
+ request_content = @client.serialize(request_mapper, disk)
727
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
728
+
729
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
730
+
731
+ request_url = @base_url || @client.base_url
732
+
733
+ options = {
734
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
735
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
736
+ query_params: {'api-version' => @client.api_version},
737
+ body: request_content,
738
+ headers: request_headers.merge(custom_headers || {}),
739
+ base_url: request_url
740
+ }
741
+ promise = @client.make_request_async(:patch, path_template, options)
742
+
743
+ promise = promise.then do |result|
744
+ http_response = result.response
745
+ status_code = http_response.status
746
+ response_content = http_response.body
747
+ unless status_code == 200 || status_code == 202
748
+ error_model = JSON.load(response_content)
749
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
750
+ end
751
+
752
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
753
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
754
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
755
+ # Deserialize Response
756
+ if status_code == 200
757
+ begin
758
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
759
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
760
+ result.body = @client.deserialize(result_mapper, parsed_response)
761
+ rescue Exception => e
762
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
763
+ end
764
+ end
765
+ # Deserialize Response
766
+ if status_code == 202
767
+ begin
768
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
769
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::Disk.mapper()
770
+ result.body = @client.deserialize(result_mapper, parsed_response)
771
+ rescue Exception => e
772
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
773
+ end
774
+ end
775
+
776
+ result
777
+ end
778
+
779
+ promise.execute
780
+ end
781
+
782
+ #
783
+ # Deletes a disk.
784
+ #
785
+ # @param resource_group_name [String] The name of the resource group.
786
+ # @param disk_name [String] The name of the managed disk that is being created.
787
+ # The name can't be changed after the disk is created. Supported characters for
788
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
789
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
790
+ # will be added to the HTTP request.
791
+ #
792
+ #
793
+ def begin_delete(resource_group_name, disk_name, custom_headers:nil)
794
+ response = begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
795
+ nil
796
+ end
797
+
798
+ #
799
+ # Deletes a disk.
800
+ #
801
+ # @param resource_group_name [String] The name of the resource group.
802
+ # @param disk_name [String] The name of the managed disk that is being created.
803
+ # The name can't be changed after the disk is created. Supported characters for
804
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
806
+ # will be added to the HTTP request.
807
+ #
808
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
809
+ #
810
+ def begin_delete_with_http_info(resource_group_name, disk_name, custom_headers:nil)
811
+ begin_delete_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
812
+ end
813
+
814
+ #
815
+ # Deletes a disk.
816
+ #
817
+ # @param resource_group_name [String] The name of the resource group.
818
+ # @param disk_name [String] The name of the managed disk that is being created.
819
+ # The name can't be changed after the disk is created. Supported characters for
820
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
821
+ # @param [Hash{String => String}] A hash of custom headers that will be added
822
+ # to the HTTP request.
823
+ #
824
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
825
+ #
826
+ def begin_delete_async(resource_group_name, disk_name, custom_headers:nil)
827
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
828
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
829
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
830
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
831
+
832
+
833
+ request_headers = {}
834
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
835
+
836
+ # Set Headers
837
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
838
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
839
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'
840
+
841
+ request_url = @base_url || @client.base_url
842
+
843
+ options = {
844
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
845
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
846
+ query_params: {'api-version' => @client.api_version},
847
+ headers: request_headers.merge(custom_headers || {}),
848
+ base_url: request_url
849
+ }
850
+ promise = @client.make_request_async(:delete, path_template, options)
851
+
852
+ promise = promise.then do |result|
853
+ http_response = result.response
854
+ status_code = http_response.status
855
+ response_content = http_response.body
856
+ unless status_code == 200 || status_code == 202 || status_code == 204
857
+ error_model = JSON.load(response_content)
858
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
859
+ end
860
+
861
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
862
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
863
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
864
+
865
+ result
866
+ end
867
+
868
+ promise.execute
869
+ end
870
+
871
+ #
872
+ # Grants access to a disk.
873
+ #
874
+ # @param resource_group_name [String] The name of the resource group.
875
+ # @param disk_name [String] The name of the managed disk that is being created.
876
+ # The name can't be changed after the disk is created. Supported characters for
877
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
878
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
879
+ # body of the get disk access operation.
880
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
881
+ # will be added to the HTTP request.
882
+ #
883
+ # @return [AccessUri] operation results.
884
+ #
885
+ def begin_grant_access(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
886
+ response = begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
887
+ response.body unless response.nil?
888
+ end
889
+
890
+ #
891
+ # Grants access to a disk.
892
+ #
893
+ # @param resource_group_name [String] The name of the resource group.
894
+ # @param disk_name [String] The name of the managed disk that is being created.
895
+ # The name can't be changed after the disk is created. Supported characters for
896
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
897
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
898
+ # body of the get disk access operation.
899
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
900
+ # will be added to the HTTP request.
901
+ #
902
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
903
+ #
904
+ def begin_grant_access_with_http_info(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
905
+ begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:custom_headers).value!
906
+ end
907
+
908
+ #
909
+ # Grants access to a disk.
910
+ #
911
+ # @param resource_group_name [String] The name of the resource group.
912
+ # @param disk_name [String] The name of the managed disk that is being created.
913
+ # The name can't be changed after the disk is created. Supported characters for
914
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
915
+ # @param grant_access_data [GrantAccessData] Access data object supplied in the
916
+ # body of the get disk access operation.
917
+ # @param [Hash{String => String}] A hash of custom headers that will be added
918
+ # to the HTTP request.
919
+ #
920
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
921
+ #
922
+ def begin_grant_access_async(resource_group_name, disk_name, grant_access_data, custom_headers:nil)
923
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
924
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
925
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
926
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
927
+ fail ArgumentError, 'grant_access_data is nil' if grant_access_data.nil?
928
+
929
+
930
+ request_headers = {}
931
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
932
+
933
+ # Set Headers
934
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
935
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
936
+
937
+ # Serialize Request
938
+ request_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::GrantAccessData.mapper()
939
+ request_content = @client.serialize(request_mapper, grant_access_data)
940
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
941
+
942
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'
943
+
944
+ request_url = @base_url || @client.base_url
945
+
946
+ options = {
947
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
948
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
949
+ query_params: {'api-version' => @client.api_version},
950
+ body: request_content,
951
+ headers: request_headers.merge(custom_headers || {}),
952
+ base_url: request_url
953
+ }
954
+ promise = @client.make_request_async(:post, path_template, options)
955
+
956
+ promise = promise.then do |result|
957
+ http_response = result.response
958
+ status_code = http_response.status
959
+ response_content = http_response.body
960
+ unless status_code == 200 || status_code == 202
961
+ error_model = JSON.load(response_content)
962
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
963
+ end
964
+
965
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
966
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
967
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
968
+ # Deserialize Response
969
+ if status_code == 200
970
+ begin
971
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
972
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::AccessUri.mapper()
973
+ result.body = @client.deserialize(result_mapper, parsed_response)
974
+ rescue Exception => e
975
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
976
+ end
977
+ end
978
+
979
+ result
980
+ end
981
+
982
+ promise.execute
983
+ end
984
+
985
+ #
986
+ # Revokes access to a disk.
987
+ #
988
+ # @param resource_group_name [String] The name of the resource group.
989
+ # @param disk_name [String] The name of the managed disk that is being created.
990
+ # The name can't be changed after the disk is created. Supported characters for
991
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
992
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
993
+ # will be added to the HTTP request.
994
+ #
995
+ #
996
+ def begin_revoke_access(resource_group_name, disk_name, custom_headers:nil)
997
+ response = begin_revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
998
+ nil
999
+ end
1000
+
1001
+ #
1002
+ # Revokes access to a disk.
1003
+ #
1004
+ # @param resource_group_name [String] The name of the resource group.
1005
+ # @param disk_name [String] The name of the managed disk that is being created.
1006
+ # The name can't be changed after the disk is created. Supported characters for
1007
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
1008
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1009
+ # will be added to the HTTP request.
1010
+ #
1011
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1012
+ #
1013
+ def begin_revoke_access_with_http_info(resource_group_name, disk_name, custom_headers:nil)
1014
+ begin_revoke_access_async(resource_group_name, disk_name, custom_headers:custom_headers).value!
1015
+ end
1016
+
1017
+ #
1018
+ # Revokes access to a disk.
1019
+ #
1020
+ # @param resource_group_name [String] The name of the resource group.
1021
+ # @param disk_name [String] The name of the managed disk that is being created.
1022
+ # The name can't be changed after the disk is created. Supported characters for
1023
+ # the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
1024
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1025
+ # to the HTTP request.
1026
+ #
1027
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1028
+ #
1029
+ def begin_revoke_access_async(resource_group_name, disk_name, custom_headers:nil)
1030
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1031
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1032
+ fail ArgumentError, 'disk_name is nil' if disk_name.nil?
1033
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1034
+
1035
+
1036
+ request_headers = {}
1037
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1038
+
1039
+ # Set Headers
1040
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1041
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1042
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'
1043
+
1044
+ request_url = @base_url || @client.base_url
1045
+
1046
+ options = {
1047
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1048
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskName' => disk_name},
1049
+ query_params: {'api-version' => @client.api_version},
1050
+ headers: request_headers.merge(custom_headers || {}),
1051
+ base_url: request_url
1052
+ }
1053
+ promise = @client.make_request_async(:post, path_template, options)
1054
+
1055
+ promise = promise.then do |result|
1056
+ http_response = result.response
1057
+ status_code = http_response.status
1058
+ response_content = http_response.body
1059
+ unless status_code == 200 || status_code == 202
1060
+ error_model = JSON.load(response_content)
1061
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1062
+ end
1063
+
1064
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1065
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1066
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1067
+
1068
+ result
1069
+ end
1070
+
1071
+ promise.execute
1072
+ end
1073
+
1074
+ #
1075
+ # Lists all the disks under a resource group.
1076
+ #
1077
+ # @param next_page_link [String] The NextLink from the previous successful call
1078
+ # to List operation.
1079
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1080
+ # will be added to the HTTP request.
1081
+ #
1082
+ # @return [DiskList] operation results.
1083
+ #
1084
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1085
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1086
+ response.body unless response.nil?
1087
+ end
1088
+
1089
+ #
1090
+ # Lists all the disks under a resource group.
1091
+ #
1092
+ # @param next_page_link [String] The NextLink from the previous successful call
1093
+ # to List 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 [MsRestAzure::AzureOperationResponse] HTTP response information.
1098
+ #
1099
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1100
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1101
+ end
1102
+
1103
+ #
1104
+ # Lists all the disks under a resource group.
1105
+ #
1106
+ # @param next_page_link [String] The NextLink from the previous successful call
1107
+ # to List operation.
1108
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1109
+ # to the HTTP request.
1110
+ #
1111
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1112
+ #
1113
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1114
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1115
+
1116
+
1117
+ request_headers = {}
1118
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1119
+
1120
+ # Set Headers
1121
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1122
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1123
+ path_template = '{nextLink}'
1124
+
1125
+ request_url = @base_url || @client.base_url
1126
+
1127
+ options = {
1128
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1129
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1130
+ headers: request_headers.merge(custom_headers || {}),
1131
+ base_url: request_url
1132
+ }
1133
+ promise = @client.make_request_async(:get, path_template, options)
1134
+
1135
+ promise = promise.then do |result|
1136
+ http_response = result.response
1137
+ status_code = http_response.status
1138
+ response_content = http_response.body
1139
+ unless status_code == 200
1140
+ error_model = JSON.load(response_content)
1141
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1142
+ end
1143
+
1144
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1145
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1146
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1147
+ # Deserialize Response
1148
+ if status_code == 200
1149
+ begin
1150
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1151
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskList.mapper()
1152
+ result.body = @client.deserialize(result_mapper, parsed_response)
1153
+ rescue Exception => e
1154
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1155
+ end
1156
+ end
1157
+
1158
+ result
1159
+ end
1160
+
1161
+ promise.execute
1162
+ end
1163
+
1164
+ #
1165
+ # Lists all the disks under a subscription.
1166
+ #
1167
+ # @param next_page_link [String] The NextLink from the previous successful call
1168
+ # to List operation.
1169
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1170
+ # will be added to the HTTP request.
1171
+ #
1172
+ # @return [DiskList] operation results.
1173
+ #
1174
+ def list_next(next_page_link, custom_headers:nil)
1175
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1176
+ response.body unless response.nil?
1177
+ end
1178
+
1179
+ #
1180
+ # Lists all the disks under a subscription.
1181
+ #
1182
+ # @param next_page_link [String] The NextLink from the previous successful call
1183
+ # to List operation.
1184
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1185
+ # will be added to the HTTP request.
1186
+ #
1187
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1188
+ #
1189
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1190
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1191
+ end
1192
+
1193
+ #
1194
+ # Lists all the disks under a subscription.
1195
+ #
1196
+ # @param next_page_link [String] The NextLink from the previous successful call
1197
+ # to List operation.
1198
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1199
+ # to the HTTP request.
1200
+ #
1201
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1202
+ #
1203
+ def list_next_async(next_page_link, custom_headers:nil)
1204
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1205
+
1206
+
1207
+ request_headers = {}
1208
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1209
+
1210
+ # Set Headers
1211
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1212
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1213
+ path_template = '{nextLink}'
1214
+
1215
+ request_url = @base_url || @client.base_url
1216
+
1217
+ options = {
1218
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1219
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1220
+ headers: request_headers.merge(custom_headers || {}),
1221
+ base_url: request_url
1222
+ }
1223
+ promise = @client.make_request_async(:get, path_template, options)
1224
+
1225
+ promise = promise.then do |result|
1226
+ http_response = result.response
1227
+ status_code = http_response.status
1228
+ response_content = http_response.body
1229
+ unless status_code == 200
1230
+ error_model = JSON.load(response_content)
1231
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1232
+ end
1233
+
1234
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1235
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1236
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1237
+ # Deserialize Response
1238
+ if status_code == 200
1239
+ begin
1240
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1241
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskList.mapper()
1242
+ result.body = @client.deserialize(result_mapper, parsed_response)
1243
+ rescue Exception => e
1244
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1245
+ end
1246
+ end
1247
+
1248
+ result
1249
+ end
1250
+
1251
+ promise.execute
1252
+ end
1253
+
1254
+ #
1255
+ # Lists all the disks under a resource group.
1256
+ #
1257
+ # @param resource_group_name [String] The name of the resource group.
1258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1259
+ # will be added to the HTTP request.
1260
+ #
1261
+ # @return [DiskList] which provide lazy access to pages of the response.
1262
+ #
1263
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1264
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1265
+ unless response.nil?
1266
+ page = response.body
1267
+ page.next_method = Proc.new do |next_page_link|
1268
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1269
+ end
1270
+ page
1271
+ end
1272
+ end
1273
+
1274
+ #
1275
+ # Lists all the disks under a subscription.
1276
+ #
1277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1278
+ # will be added to the HTTP request.
1279
+ #
1280
+ # @return [DiskList] which provide lazy access to pages of the response.
1281
+ #
1282
+ def list_as_lazy(custom_headers:nil)
1283
+ response = list_async(custom_headers:custom_headers).value!
1284
+ unless response.nil?
1285
+ page = response.body
1286
+ page.next_method = Proc.new do |next_page_link|
1287
+ list_next_async(next_page_link, custom_headers:custom_headers)
1288
+ end
1289
+ page
1290
+ end
1291
+ end
1292
+
1293
+ end
1294
+ end