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,80 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2020-06-30/generated/azure_mgmt_compute/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Compute::Mgmt::V2020_06_30
23
+ autoload :Disks, '2020-06-30/generated/azure_mgmt_compute/disks.rb'
24
+ autoload :Snapshots, '2020-06-30/generated/azure_mgmt_compute/snapshots.rb'
25
+ autoload :DiskEncryptionSets, '2020-06-30/generated/azure_mgmt_compute/disk_encryption_sets.rb'
26
+ autoload :DiskAccesses, '2020-06-30/generated/azure_mgmt_compute/disk_accesses.rb'
27
+ autoload :ComputeManagementClient, '2020-06-30/generated/azure_mgmt_compute/compute_management_client.rb'
28
+
29
+ module Models
30
+ autoload :SnapshotUpdate, '2020-06-30/generated/azure_mgmt_compute/models/snapshot_update.rb'
31
+ autoload :Resource, '2020-06-30/generated/azure_mgmt_compute/models/resource.rb'
32
+ autoload :SnapshotList, '2020-06-30/generated/azure_mgmt_compute/models/snapshot_list.rb'
33
+ autoload :ImageDiskReference, '2020-06-30/generated/azure_mgmt_compute/models/image_disk_reference.rb'
34
+ autoload :EncryptionSetIdentity, '2020-06-30/generated/azure_mgmt_compute/models/encryption_set_identity.rb'
35
+ autoload :SourceVault, '2020-06-30/generated/azure_mgmt_compute/models/source_vault.rb'
36
+ autoload :KeyVaultAndSecretReference, '2020-06-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb'
37
+ autoload :KeyVaultAndKeyReference, '2020-06-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb'
38
+ autoload :EncryptionSettingsCollection, '2020-06-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb'
39
+ autoload :DiskEncryptionSetUpdate, '2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_update.rb'
40
+ autoload :ShareInfoElement, '2020-06-30/generated/azure_mgmt_compute/models/share_info_element.rb'
41
+ autoload :DiskEncryptionSetList, '2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_list.rb'
42
+ autoload :DiskUpdate, '2020-06-30/generated/azure_mgmt_compute/models/disk_update.rb'
43
+ autoload :ResourceUriList, '2020-06-30/generated/azure_mgmt_compute/models/resource_uri_list.rb'
44
+ autoload :SnapshotSku, '2020-06-30/generated/azure_mgmt_compute/models/snapshot_sku.rb'
45
+ autoload :PrivateEndpoint, '2020-06-30/generated/azure_mgmt_compute/models/private_endpoint.rb'
46
+ autoload :AccessUri, '2020-06-30/generated/azure_mgmt_compute/models/access_uri.rb'
47
+ autoload :PrivateLinkServiceConnectionState, '2020-06-30/generated/azure_mgmt_compute/models/private_link_service_connection_state.rb'
48
+ autoload :DiskSku, '2020-06-30/generated/azure_mgmt_compute/models/disk_sku.rb'
49
+ autoload :PrivateEndpointConnection, '2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_connection.rb'
50
+ autoload :EncryptionSettingsElement, '2020-06-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb'
51
+ autoload :ApiError, '2020-06-30/generated/azure_mgmt_compute/models/api_error.rb'
52
+ autoload :Encryption, '2020-06-30/generated/azure_mgmt_compute/models/encryption.rb'
53
+ autoload :ApiErrorBase, '2020-06-30/generated/azure_mgmt_compute/models/api_error_base.rb'
54
+ autoload :GrantAccessData, '2020-06-30/generated/azure_mgmt_compute/models/grant_access_data.rb'
55
+ autoload :DiskAccessList, '2020-06-30/generated/azure_mgmt_compute/models/disk_access_list.rb'
56
+ autoload :CreationData, '2020-06-30/generated/azure_mgmt_compute/models/creation_data.rb'
57
+ autoload :DiskAccessUpdate, '2020-06-30/generated/azure_mgmt_compute/models/disk_access_update.rb'
58
+ autoload :InnerError, '2020-06-30/generated/azure_mgmt_compute/models/inner_error.rb'
59
+ autoload :PrivateLinkResource, '2020-06-30/generated/azure_mgmt_compute/models/private_link_resource.rb'
60
+ autoload :DiskList, '2020-06-30/generated/azure_mgmt_compute/models/disk_list.rb'
61
+ autoload :PrivateLinkResourceListResult, '2020-06-30/generated/azure_mgmt_compute/models/private_link_resource_list_result.rb'
62
+ autoload :Disk, '2020-06-30/generated/azure_mgmt_compute/models/disk.rb'
63
+ autoload :Snapshot, '2020-06-30/generated/azure_mgmt_compute/models/snapshot.rb'
64
+ autoload :DiskEncryptionSet, '2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set.rb'
65
+ autoload :DiskAccess, '2020-06-30/generated/azure_mgmt_compute/models/disk_access.rb'
66
+ autoload :DiskStorageAccountTypes, '2020-06-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb'
67
+ autoload :OperatingSystemTypes, '2020-06-30/generated/azure_mgmt_compute/models/operating_system_types.rb'
68
+ autoload :HyperVGeneration, '2020-06-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb'
69
+ autoload :DiskCreateOption, '2020-06-30/generated/azure_mgmt_compute/models/disk_create_option.rb'
70
+ autoload :DiskState, '2020-06-30/generated/azure_mgmt_compute/models/disk_state.rb'
71
+ autoload :EncryptionType, '2020-06-30/generated/azure_mgmt_compute/models/encryption_type.rb'
72
+ autoload :NetworkAccessPolicy, '2020-06-30/generated/azure_mgmt_compute/models/network_access_policy.rb'
73
+ autoload :SnapshotStorageAccountTypes, '2020-06-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb'
74
+ autoload :DiskEncryptionSetType, '2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_type.rb'
75
+ autoload :AccessLevel, '2020-06-30/generated/azure_mgmt_compute/models/access_level.rb'
76
+ autoload :DiskEncryptionSetIdentityType, '2020-06-30/generated/azure_mgmt_compute/models/disk_encryption_set_identity_type.rb'
77
+ autoload :PrivateEndpointServiceConnectionStatus, '2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_service_connection_status.rb'
78
+ autoload :PrivateEndpointConnectionProvisioningState, '2020-06-30/generated/azure_mgmt_compute/models/private_endpoint_connection_provisioning_state.rb'
79
+ end
80
+ end
@@ -0,0 +1,145 @@
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
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class ComputeManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Subscription credentials which uniquely identify
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] Client Api Version.
26
+ attr_reader :api_version
27
+
28
+ # @return [String] The preferred language for the response.
29
+ attr_accessor :accept_language
30
+
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
+ attr_accessor :long_running_operation_retry_timeout
34
+
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
38
+ attr_accessor :generate_client_request_id
39
+
40
+ # @return [Disks] disks
41
+ attr_reader :disks
42
+
43
+ # @return [Snapshots] snapshots
44
+ attr_reader :snapshots
45
+
46
+ # @return [DiskEncryptionSets] disk_encryption_sets
47
+ attr_reader :disk_encryption_sets
48
+
49
+ # @return [DiskAccesses] disk_accesses
50
+ attr_reader :disk_accesses
51
+
52
+ #
53
+ # Creates initializes a new instance of the ComputeManagementClient class.
54
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
55
+ # @param base_url [String] the base URI of the service.
56
+ # @param options [Array] filters to be applied to the HTTP requests.
57
+ #
58
+ def initialize(credentials = nil, base_url = nil, options = nil)
59
+ super(credentials, options)
60
+ @base_url = base_url || 'https://management.azure.com'
61
+
62
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
63
+ @credentials = credentials
64
+
65
+ @disks = Disks.new(self)
66
+ @snapshots = Snapshots.new(self)
67
+ @disk_encryption_sets = DiskEncryptionSets.new(self)
68
+ @disk_accesses = DiskAccesses.new(self)
69
+ @api_version = '2020-06-30'
70
+ @accept_language = 'en-US'
71
+ @long_running_operation_retry_timeout = 30
72
+ @generate_client_request_id = true
73
+ add_telemetry
74
+ end
75
+
76
+ #
77
+ # Makes a request and returns the body of the response.
78
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
79
+ # @param path [String] the path, relative to {base_url}.
80
+ # @param options [Hash{String=>String}] specifying any request options like :body.
81
+ # @return [Hash{String=>String}] containing the body of the response.
82
+ # Example:
83
+ #
84
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
85
+ # path = "/path"
86
+ # options = {
87
+ # body: request_content,
88
+ # query_params: {'api-version' => '2016-02-01'}
89
+ # }
90
+ # result = @client.make_request(:put, path, options)
91
+ #
92
+ def make_request(method, path, options = {})
93
+ result = make_request_with_http_info(method, path, options)
94
+ result.body unless result.nil?
95
+ end
96
+
97
+ #
98
+ # Makes a request and returns the operation response.
99
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
100
+ # @param path [String] the path, relative to {base_url}.
101
+ # @param options [Hash{String=>String}] specifying any request options like :body.
102
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
103
+ #
104
+ def make_request_with_http_info(method, path, options = {})
105
+ result = make_request_async(method, path, options).value!
106
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
107
+ result
108
+ end
109
+
110
+ #
111
+ # Makes a request asynchronously.
112
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
113
+ # @param path [String] the path, relative to {base_url}.
114
+ # @param options [Hash{String=>String}] specifying any request options like :body.
115
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
116
+ #
117
+ def make_request_async(method, path, options = {})
118
+ fail ArgumentError, 'method is nil' if method.nil?
119
+ fail ArgumentError, 'path is nil' if path.nil?
120
+
121
+ request_url = options[:base_url] || @base_url
122
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
123
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
124
+ end
125
+
126
+ request_headers = @request_headers
127
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
128
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
129
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
130
+
131
+ super(request_url, method, path, options)
132
+ end
133
+
134
+
135
+ private
136
+ #
137
+ # Adds telemetry information.
138
+ #
139
+ def add_telemetry
140
+ sdk_information = 'azure_mgmt_compute'
141
+ sdk_information = "#{sdk_information}/0.20.0"
142
+ add_user_agent_information(sdk_information)
143
+ end
144
+ end
145
+ end
@@ -0,0 +1,1120 @@
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 DiskAccesses
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DiskAccesses 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 access resource
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param disk_access_name [String] The name of the disk access resource that is
29
+ # being created. The name can't be changed after the disk encryption set is
30
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
31
+ # maximum name length is 80 characters.
32
+ # @param disk_access [DiskAccess] disk access object supplied in the body of
33
+ # the Put disk access operation.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [DiskAccess] operation results.
38
+ #
39
+ def create_or_update(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
40
+ response = create_or_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group.
46
+ # @param disk_access_name [String] The name of the disk access resource that is
47
+ # being created. The name can't be changed after the disk encryption set is
48
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
49
+ # maximum name length is 80 characters.
50
+ # @param disk_access [DiskAccess] disk access object supplied in the body of
51
+ # the Put disk access operation.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] promise which provides async access to http
56
+ # response.
57
+ #
58
+ def create_or_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
59
+ # Send request
60
+ promise = begin_create_or_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers)
61
+
62
+ promise = promise.then do |response|
63
+ # Defining deserialization method.
64
+ deserialize_method = lambda do |parsed_response|
65
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
66
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
67
+ end
68
+
69
+ # Waiting for response.
70
+ @client.get_long_running_operation_result(response, deserialize_method)
71
+ end
72
+
73
+ promise
74
+ end
75
+
76
+ #
77
+ # Updates (patches) a disk access resource.
78
+ #
79
+ # @param resource_group_name [String] The name of the resource group.
80
+ # @param disk_access_name [String] The name of the disk access resource that is
81
+ # being created. The name can't be changed after the disk encryption set is
82
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
83
+ # maximum name length is 80 characters.
84
+ # @param disk_access [DiskAccessUpdate] disk access object supplied in the body
85
+ # of the Patch disk access operation.
86
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
87
+ # will be added to the HTTP request.
88
+ #
89
+ # @return [DiskAccess] operation results.
90
+ #
91
+ def update(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
92
+ response = update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers).value!
93
+ response.body unless response.nil?
94
+ end
95
+
96
+ #
97
+ # @param resource_group_name [String] The name of the resource group.
98
+ # @param disk_access_name [String] The name of the disk access resource that is
99
+ # being created. The name can't be changed after the disk encryption set is
100
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
101
+ # maximum name length is 80 characters.
102
+ # @param disk_access [DiskAccessUpdate] disk access object supplied in the body
103
+ # of the Patch disk access operation.
104
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
105
+ # will be added to the HTTP request.
106
+ #
107
+ # @return [Concurrent::Promise] promise which provides async access to http
108
+ # response.
109
+ #
110
+ def update_async(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
111
+ # Send request
112
+ promise = begin_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers)
113
+
114
+ promise = promise.then do |response|
115
+ # Defining deserialization method.
116
+ deserialize_method = lambda do |parsed_response|
117
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
118
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
119
+ end
120
+
121
+ # Waiting for response.
122
+ @client.get_long_running_operation_result(response, deserialize_method)
123
+ end
124
+
125
+ promise
126
+ end
127
+
128
+ #
129
+ # Gets information about a disk access resource.
130
+ #
131
+ # @param resource_group_name [String] The name of the resource group.
132
+ # @param disk_access_name [String] The name of the disk access resource that is
133
+ # being created. The name can't be changed after the disk encryption set is
134
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
135
+ # maximum name length is 80 characters.
136
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
137
+ # will be added to the HTTP request.
138
+ #
139
+ # @return [DiskAccess] operation results.
140
+ #
141
+ def get(resource_group_name, disk_access_name, custom_headers:nil)
142
+ response = get_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
143
+ response.body unless response.nil?
144
+ end
145
+
146
+ #
147
+ # Gets information about a disk access resource.
148
+ #
149
+ # @param resource_group_name [String] The name of the resource group.
150
+ # @param disk_access_name [String] The name of the disk access resource that is
151
+ # being created. The name can't be changed after the disk encryption set is
152
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
153
+ # maximum name length is 80 characters.
154
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
155
+ # will be added to the HTTP request.
156
+ #
157
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
158
+ #
159
+ def get_with_http_info(resource_group_name, disk_access_name, custom_headers:nil)
160
+ get_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
161
+ end
162
+
163
+ #
164
+ # Gets information about a disk access resource.
165
+ #
166
+ # @param resource_group_name [String] The name of the resource group.
167
+ # @param disk_access_name [String] The name of the disk access resource that is
168
+ # being created. The name can't be changed after the disk encryption set is
169
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
170
+ # maximum name length is 80 characters.
171
+ # @param [Hash{String => String}] A hash of custom headers that will be added
172
+ # to the HTTP request.
173
+ #
174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
175
+ #
176
+ def get_async(resource_group_name, disk_access_name, custom_headers:nil)
177
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
178
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
179
+ fail ArgumentError, 'disk_access_name is nil' if disk_access_name.nil?
180
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
181
+
182
+
183
+ request_headers = {}
184
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
185
+
186
+ # Set Headers
187
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
188
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
189
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'
190
+
191
+ request_url = @base_url || @client.base_url
192
+
193
+ options = {
194
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
195
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskAccessName' => disk_access_name},
196
+ query_params: {'api-version' => @client.api_version},
197
+ headers: request_headers.merge(custom_headers || {}),
198
+ base_url: request_url
199
+ }
200
+ promise = @client.make_request_async(:get, path_template, options)
201
+
202
+ promise = promise.then do |result|
203
+ http_response = result.response
204
+ status_code = http_response.status
205
+ response_content = http_response.body
206
+ unless status_code == 200
207
+ error_model = JSON.load(response_content)
208
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
209
+ end
210
+
211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
212
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
213
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
214
+ # Deserialize Response
215
+ if status_code == 200
216
+ begin
217
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
218
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
219
+ result.body = @client.deserialize(result_mapper, parsed_response)
220
+ rescue Exception => e
221
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
222
+ end
223
+ end
224
+
225
+ result
226
+ end
227
+
228
+ promise.execute
229
+ end
230
+
231
+ #
232
+ # Deletes a disk access resource.
233
+ #
234
+ # @param resource_group_name [String] The name of the resource group.
235
+ # @param disk_access_name [String] The name of the disk access resource that is
236
+ # being created. The name can't be changed after the disk encryption set is
237
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
238
+ # maximum name length is 80 characters.
239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
240
+ # will be added to the HTTP request.
241
+ #
242
+ def delete(resource_group_name, disk_access_name, custom_headers:nil)
243
+ response = delete_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
244
+ nil
245
+ end
246
+
247
+ #
248
+ # @param resource_group_name [String] The name of the resource group.
249
+ # @param disk_access_name [String] The name of the disk access resource that is
250
+ # being created. The name can't be changed after the disk encryption set is
251
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
252
+ # maximum name length is 80 characters.
253
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
+ # will be added to the HTTP request.
255
+ #
256
+ # @return [Concurrent::Promise] promise which provides async access to http
257
+ # response.
258
+ #
259
+ def delete_async(resource_group_name, disk_access_name, custom_headers:nil)
260
+ # Send request
261
+ promise = begin_delete_async(resource_group_name, disk_access_name, custom_headers:custom_headers)
262
+
263
+ promise = promise.then do |response|
264
+ # Defining deserialization method.
265
+ deserialize_method = lambda do |parsed_response|
266
+ end
267
+
268
+ # Waiting for response.
269
+ @client.get_long_running_operation_result(response, deserialize_method)
270
+ end
271
+
272
+ promise
273
+ end
274
+
275
+ #
276
+ # Lists all the disk access resources under a resource group.
277
+ #
278
+ # @param resource_group_name [String] The name of the resource group.
279
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
280
+ # will be added to the HTTP request.
281
+ #
282
+ # @return [Array<DiskAccess>] operation results.
283
+ #
284
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
285
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
286
+ first_page.get_all_items
287
+ end
288
+
289
+ #
290
+ # Lists all the disk access resources under a resource group.
291
+ #
292
+ # @param resource_group_name [String] The name of the resource group.
293
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
294
+ # will be added to the HTTP request.
295
+ #
296
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
297
+ #
298
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
299
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
300
+ end
301
+
302
+ #
303
+ # Lists all the disk access resources under a resource group.
304
+ #
305
+ # @param resource_group_name [String] The name of the resource group.
306
+ # @param [Hash{String => String}] A hash of custom headers that will be added
307
+ # to the HTTP request.
308
+ #
309
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
310
+ #
311
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
312
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
313
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
314
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
315
+
316
+
317
+ request_headers = {}
318
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
319
+
320
+ # Set Headers
321
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
322
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
323
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses'
324
+
325
+ request_url = @base_url || @client.base_url
326
+
327
+ options = {
328
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
329
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
330
+ query_params: {'api-version' => @client.api_version},
331
+ headers: request_headers.merge(custom_headers || {}),
332
+ base_url: request_url
333
+ }
334
+ promise = @client.make_request_async(:get, path_template, options)
335
+
336
+ promise = promise.then do |result|
337
+ http_response = result.response
338
+ status_code = http_response.status
339
+ response_content = http_response.body
340
+ unless status_code == 200
341
+ error_model = JSON.load(response_content)
342
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
343
+ end
344
+
345
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
346
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
347
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
348
+ # Deserialize Response
349
+ if status_code == 200
350
+ begin
351
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
352
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccessList.mapper()
353
+ result.body = @client.deserialize(result_mapper, parsed_response)
354
+ rescue Exception => e
355
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
356
+ end
357
+ end
358
+
359
+ result
360
+ end
361
+
362
+ promise.execute
363
+ end
364
+
365
+ #
366
+ # Lists all the disk access resources under a subscription.
367
+ #
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [Array<DiskAccess>] operation results.
372
+ #
373
+ def list(custom_headers:nil)
374
+ first_page = list_as_lazy(custom_headers:custom_headers)
375
+ first_page.get_all_items
376
+ end
377
+
378
+ #
379
+ # Lists all the disk access resources under a subscription.
380
+ #
381
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
382
+ # will be added to the HTTP request.
383
+ #
384
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
385
+ #
386
+ def list_with_http_info(custom_headers:nil)
387
+ list_async(custom_headers:custom_headers).value!
388
+ end
389
+
390
+ #
391
+ # Lists all the disk access resources under a subscription.
392
+ #
393
+ # @param [Hash{String => String}] A hash of custom headers that will be added
394
+ # to the HTTP request.
395
+ #
396
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
397
+ #
398
+ def list_async(custom_headers:nil)
399
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
400
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
401
+
402
+
403
+ request_headers = {}
404
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
405
+
406
+ # Set Headers
407
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
408
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
409
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses'
410
+
411
+ request_url = @base_url || @client.base_url
412
+
413
+ options = {
414
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
415
+ path_params: {'subscriptionId' => @client.subscription_id},
416
+ query_params: {'api-version' => @client.api_version},
417
+ headers: request_headers.merge(custom_headers || {}),
418
+ base_url: request_url
419
+ }
420
+ promise = @client.make_request_async(:get, path_template, options)
421
+
422
+ promise = promise.then do |result|
423
+ http_response = result.response
424
+ status_code = http_response.status
425
+ response_content = http_response.body
426
+ unless status_code == 200
427
+ error_model = JSON.load(response_content)
428
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
429
+ end
430
+
431
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
432
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
433
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
434
+ # Deserialize Response
435
+ if status_code == 200
436
+ begin
437
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
438
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccessList.mapper()
439
+ result.body = @client.deserialize(result_mapper, parsed_response)
440
+ rescue Exception => e
441
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
442
+ end
443
+ end
444
+
445
+ result
446
+ end
447
+
448
+ promise.execute
449
+ end
450
+
451
+ #
452
+ # Gets the private link resources possible under disk access resource
453
+ #
454
+ # @param resource_group_name [String] The name of the resource group.
455
+ # @param disk_access_name [String] The name of the disk access resource that is
456
+ # being created. The name can't be changed after the disk encryption set is
457
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
458
+ # maximum name length is 80 characters.
459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
460
+ # will be added to the HTTP request.
461
+ #
462
+ # @return [PrivateLinkResourceListResult] operation results.
463
+ #
464
+ def get_private_link_resources(resource_group_name, disk_access_name, custom_headers:nil)
465
+ response = get_private_link_resources_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
466
+ response.body unless response.nil?
467
+ end
468
+
469
+ #
470
+ # Gets the private link resources possible under disk access resource
471
+ #
472
+ # @param resource_group_name [String] The name of the resource group.
473
+ # @param disk_access_name [String] The name of the disk access resource that is
474
+ # being created. The name can't be changed after the disk encryption set is
475
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
476
+ # maximum name length is 80 characters.
477
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
478
+ # will be added to the HTTP request.
479
+ #
480
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
481
+ #
482
+ def get_private_link_resources_with_http_info(resource_group_name, disk_access_name, custom_headers:nil)
483
+ get_private_link_resources_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
484
+ end
485
+
486
+ #
487
+ # Gets the private link resources possible under disk access resource
488
+ #
489
+ # @param resource_group_name [String] The name of the resource group.
490
+ # @param disk_access_name [String] The name of the disk access resource that is
491
+ # being created. The name can't be changed after the disk encryption set is
492
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
493
+ # maximum name length is 80 characters.
494
+ # @param [Hash{String => String}] A hash of custom headers that will be added
495
+ # to the HTTP request.
496
+ #
497
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
498
+ #
499
+ def get_private_link_resources_async(resource_group_name, disk_access_name, custom_headers:nil)
500
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
501
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
502
+ fail ArgumentError, 'disk_access_name is nil' if disk_access_name.nil?
503
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
504
+
505
+
506
+ request_headers = {}
507
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
508
+
509
+ # Set Headers
510
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
511
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
512
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources'
513
+
514
+ request_url = @base_url || @client.base_url
515
+
516
+ options = {
517
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
518
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskAccessName' => disk_access_name},
519
+ query_params: {'api-version' => @client.api_version},
520
+ headers: request_headers.merge(custom_headers || {}),
521
+ base_url: request_url
522
+ }
523
+ promise = @client.make_request_async(:get, path_template, options)
524
+
525
+ promise = promise.then do |result|
526
+ http_response = result.response
527
+ status_code = http_response.status
528
+ response_content = http_response.body
529
+ unless status_code == 200
530
+ error_model = JSON.load(response_content)
531
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
532
+ end
533
+
534
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
535
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
536
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
537
+ # Deserialize Response
538
+ if status_code == 200
539
+ begin
540
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
541
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::PrivateLinkResourceListResult.mapper()
542
+ result.body = @client.deserialize(result_mapper, parsed_response)
543
+ rescue Exception => e
544
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
545
+ end
546
+ end
547
+
548
+ result
549
+ end
550
+
551
+ promise.execute
552
+ end
553
+
554
+ #
555
+ # Creates or updates a disk access resource
556
+ #
557
+ # @param resource_group_name [String] The name of the resource group.
558
+ # @param disk_access_name [String] The name of the disk access resource that is
559
+ # being created. The name can't be changed after the disk encryption set is
560
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
561
+ # maximum name length is 80 characters.
562
+ # @param disk_access [DiskAccess] disk access object supplied in the body of
563
+ # the Put disk access operation.
564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
565
+ # will be added to the HTTP request.
566
+ #
567
+ # @return [DiskAccess] operation results.
568
+ #
569
+ def begin_create_or_update(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
570
+ response = begin_create_or_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers).value!
571
+ response.body unless response.nil?
572
+ end
573
+
574
+ #
575
+ # Creates or updates a disk access resource
576
+ #
577
+ # @param resource_group_name [String] The name of the resource group.
578
+ # @param disk_access_name [String] The name of the disk access resource that is
579
+ # being created. The name can't be changed after the disk encryption set is
580
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
581
+ # maximum name length is 80 characters.
582
+ # @param disk_access [DiskAccess] disk access object supplied in the body of
583
+ # the Put disk access operation.
584
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
585
+ # will be added to the HTTP request.
586
+ #
587
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
588
+ #
589
+ def begin_create_or_update_with_http_info(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
590
+ begin_create_or_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers).value!
591
+ end
592
+
593
+ #
594
+ # Creates or updates a disk access resource
595
+ #
596
+ # @param resource_group_name [String] The name of the resource group.
597
+ # @param disk_access_name [String] The name of the disk access resource that is
598
+ # being created. The name can't be changed after the disk encryption set is
599
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
600
+ # maximum name length is 80 characters.
601
+ # @param disk_access [DiskAccess] disk access object supplied in the body of
602
+ # the Put disk access operation.
603
+ # @param [Hash{String => String}] A hash of custom headers that will be added
604
+ # to the HTTP request.
605
+ #
606
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
607
+ #
608
+ def begin_create_or_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
609
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
610
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
611
+ fail ArgumentError, 'disk_access_name is nil' if disk_access_name.nil?
612
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
613
+ fail ArgumentError, 'disk_access is nil' if disk_access.nil?
614
+
615
+
616
+ request_headers = {}
617
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
618
+
619
+ # Set Headers
620
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
621
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
622
+
623
+ # Serialize Request
624
+ request_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
625
+ request_content = @client.serialize(request_mapper, disk_access)
626
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
627
+
628
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'
629
+
630
+ request_url = @base_url || @client.base_url
631
+
632
+ options = {
633
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
634
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskAccessName' => disk_access_name},
635
+ query_params: {'api-version' => @client.api_version},
636
+ body: request_content,
637
+ headers: request_headers.merge(custom_headers || {}),
638
+ base_url: request_url
639
+ }
640
+ promise = @client.make_request_async(:put, path_template, options)
641
+
642
+ promise = promise.then do |result|
643
+ http_response = result.response
644
+ status_code = http_response.status
645
+ response_content = http_response.body
646
+ unless status_code == 200 || status_code == 202
647
+ error_model = JSON.load(response_content)
648
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
649
+ end
650
+
651
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
652
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
653
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
654
+ # Deserialize Response
655
+ if status_code == 200
656
+ begin
657
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
658
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
659
+ result.body = @client.deserialize(result_mapper, parsed_response)
660
+ rescue Exception => e
661
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
662
+ end
663
+ end
664
+ # Deserialize Response
665
+ if status_code == 202
666
+ begin
667
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
668
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
669
+ result.body = @client.deserialize(result_mapper, parsed_response)
670
+ rescue Exception => e
671
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
672
+ end
673
+ end
674
+
675
+ result
676
+ end
677
+
678
+ promise.execute
679
+ end
680
+
681
+ #
682
+ # Updates (patches) a disk access resource.
683
+ #
684
+ # @param resource_group_name [String] The name of the resource group.
685
+ # @param disk_access_name [String] The name of the disk access resource that is
686
+ # being created. The name can't be changed after the disk encryption set is
687
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
688
+ # maximum name length is 80 characters.
689
+ # @param disk_access [DiskAccessUpdate] disk access object supplied in the body
690
+ # of the Patch disk access operation.
691
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
692
+ # will be added to the HTTP request.
693
+ #
694
+ # @return [DiskAccess] operation results.
695
+ #
696
+ def begin_update(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
697
+ response = begin_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers).value!
698
+ response.body unless response.nil?
699
+ end
700
+
701
+ #
702
+ # Updates (patches) a disk access resource.
703
+ #
704
+ # @param resource_group_name [String] The name of the resource group.
705
+ # @param disk_access_name [String] The name of the disk access resource that is
706
+ # being created. The name can't be changed after the disk encryption set is
707
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
708
+ # maximum name length is 80 characters.
709
+ # @param disk_access [DiskAccessUpdate] disk access object supplied in the body
710
+ # of the Patch disk access operation.
711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
712
+ # will be added to the HTTP request.
713
+ #
714
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
715
+ #
716
+ def begin_update_with_http_info(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
717
+ begin_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:custom_headers).value!
718
+ end
719
+
720
+ #
721
+ # Updates (patches) a disk access resource.
722
+ #
723
+ # @param resource_group_name [String] The name of the resource group.
724
+ # @param disk_access_name [String] The name of the disk access resource that is
725
+ # being created. The name can't be changed after the disk encryption set is
726
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
727
+ # maximum name length is 80 characters.
728
+ # @param disk_access [DiskAccessUpdate] disk access object supplied in the body
729
+ # of the Patch disk access operation.
730
+ # @param [Hash{String => String}] A hash of custom headers that will be added
731
+ # to the HTTP request.
732
+ #
733
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
734
+ #
735
+ def begin_update_async(resource_group_name, disk_access_name, disk_access, custom_headers:nil)
736
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
737
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
738
+ fail ArgumentError, 'disk_access_name is nil' if disk_access_name.nil?
739
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
740
+ fail ArgumentError, 'disk_access is nil' if disk_access.nil?
741
+
742
+
743
+ request_headers = {}
744
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
745
+
746
+ # Set Headers
747
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
748
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
749
+
750
+ # Serialize Request
751
+ request_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccessUpdate.mapper()
752
+ request_content = @client.serialize(request_mapper, disk_access)
753
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
754
+
755
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'
756
+
757
+ request_url = @base_url || @client.base_url
758
+
759
+ options = {
760
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
761
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskAccessName' => disk_access_name},
762
+ query_params: {'api-version' => @client.api_version},
763
+ body: request_content,
764
+ headers: request_headers.merge(custom_headers || {}),
765
+ base_url: request_url
766
+ }
767
+ promise = @client.make_request_async(:patch, path_template, options)
768
+
769
+ promise = promise.then do |result|
770
+ http_response = result.response
771
+ status_code = http_response.status
772
+ response_content = http_response.body
773
+ unless status_code == 200 || status_code == 202
774
+ error_model = JSON.load(response_content)
775
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
776
+ end
777
+
778
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
779
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
780
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
781
+ # Deserialize Response
782
+ if status_code == 200
783
+ begin
784
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
785
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
786
+ result.body = @client.deserialize(result_mapper, parsed_response)
787
+ rescue Exception => e
788
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
789
+ end
790
+ end
791
+ # Deserialize Response
792
+ if status_code == 202
793
+ begin
794
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
795
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccess.mapper()
796
+ result.body = @client.deserialize(result_mapper, parsed_response)
797
+ rescue Exception => e
798
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
799
+ end
800
+ end
801
+
802
+ result
803
+ end
804
+
805
+ promise.execute
806
+ end
807
+
808
+ #
809
+ # Deletes a disk access resource.
810
+ #
811
+ # @param resource_group_name [String] The name of the resource group.
812
+ # @param disk_access_name [String] The name of the disk access resource that is
813
+ # being created. The name can't be changed after the disk encryption set is
814
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
815
+ # maximum name length is 80 characters.
816
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
817
+ # will be added to the HTTP request.
818
+ #
819
+ #
820
+ def begin_delete(resource_group_name, disk_access_name, custom_headers:nil)
821
+ response = begin_delete_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
822
+ nil
823
+ end
824
+
825
+ #
826
+ # Deletes a disk access resource.
827
+ #
828
+ # @param resource_group_name [String] The name of the resource group.
829
+ # @param disk_access_name [String] The name of the disk access resource that is
830
+ # being created. The name can't be changed after the disk encryption set is
831
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
832
+ # maximum name length is 80 characters.
833
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
834
+ # will be added to the HTTP request.
835
+ #
836
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
837
+ #
838
+ def begin_delete_with_http_info(resource_group_name, disk_access_name, custom_headers:nil)
839
+ begin_delete_async(resource_group_name, disk_access_name, custom_headers:custom_headers).value!
840
+ end
841
+
842
+ #
843
+ # Deletes a disk access resource.
844
+ #
845
+ # @param resource_group_name [String] The name of the resource group.
846
+ # @param disk_access_name [String] The name of the disk access resource that is
847
+ # being created. The name can't be changed after the disk encryption set is
848
+ # created. Supported characters for the name are a-z, A-Z, 0-9 and _. The
849
+ # maximum name length is 80 characters.
850
+ # @param [Hash{String => String}] A hash of custom headers that will be added
851
+ # to the HTTP request.
852
+ #
853
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
854
+ #
855
+ def begin_delete_async(resource_group_name, disk_access_name, custom_headers:nil)
856
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
857
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
858
+ fail ArgumentError, 'disk_access_name is nil' if disk_access_name.nil?
859
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
860
+
861
+
862
+ request_headers = {}
863
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
864
+
865
+ # Set Headers
866
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
867
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
868
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'
869
+
870
+ request_url = @base_url || @client.base_url
871
+
872
+ options = {
873
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
874
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'diskAccessName' => disk_access_name},
875
+ query_params: {'api-version' => @client.api_version},
876
+ headers: request_headers.merge(custom_headers || {}),
877
+ base_url: request_url
878
+ }
879
+ promise = @client.make_request_async(:delete, path_template, options)
880
+
881
+ promise = promise.then do |result|
882
+ http_response = result.response
883
+ status_code = http_response.status
884
+ response_content = http_response.body
885
+ unless status_code == 200 || status_code == 202 || status_code == 204
886
+ error_model = JSON.load(response_content)
887
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
888
+ end
889
+
890
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
891
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
892
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
893
+
894
+ result
895
+ end
896
+
897
+ promise.execute
898
+ end
899
+
900
+ #
901
+ # Lists all the disk access resources under a resource group.
902
+ #
903
+ # @param next_page_link [String] The NextLink from the previous successful call
904
+ # to List operation.
905
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
906
+ # will be added to the HTTP request.
907
+ #
908
+ # @return [DiskAccessList] operation results.
909
+ #
910
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
911
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
912
+ response.body unless response.nil?
913
+ end
914
+
915
+ #
916
+ # Lists all the disk access resources under a resource group.
917
+ #
918
+ # @param next_page_link [String] The NextLink from the previous successful call
919
+ # to List operation.
920
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
921
+ # will be added to the HTTP request.
922
+ #
923
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
924
+ #
925
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
926
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
927
+ end
928
+
929
+ #
930
+ # Lists all the disk access resources under a resource group.
931
+ #
932
+ # @param next_page_link [String] The NextLink from the previous successful call
933
+ # to List operation.
934
+ # @param [Hash{String => String}] A hash of custom headers that will be added
935
+ # to the HTTP request.
936
+ #
937
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
938
+ #
939
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
940
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
941
+
942
+
943
+ request_headers = {}
944
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
945
+
946
+ # Set Headers
947
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
948
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
949
+ path_template = '{nextLink}'
950
+
951
+ request_url = @base_url || @client.base_url
952
+
953
+ options = {
954
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
955
+ skip_encoding_path_params: {'nextLink' => next_page_link},
956
+ headers: request_headers.merge(custom_headers || {}),
957
+ base_url: request_url
958
+ }
959
+ promise = @client.make_request_async(:get, path_template, options)
960
+
961
+ promise = promise.then do |result|
962
+ http_response = result.response
963
+ status_code = http_response.status
964
+ response_content = http_response.body
965
+ unless status_code == 200
966
+ error_model = JSON.load(response_content)
967
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
968
+ end
969
+
970
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
971
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
972
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
973
+ # Deserialize Response
974
+ if status_code == 200
975
+ begin
976
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
977
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccessList.mapper()
978
+ result.body = @client.deserialize(result_mapper, parsed_response)
979
+ rescue Exception => e
980
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
981
+ end
982
+ end
983
+
984
+ result
985
+ end
986
+
987
+ promise.execute
988
+ end
989
+
990
+ #
991
+ # Lists all the disk access resources under a subscription.
992
+ #
993
+ # @param next_page_link [String] The NextLink from the previous successful call
994
+ # to List operation.
995
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
996
+ # will be added to the HTTP request.
997
+ #
998
+ # @return [DiskAccessList] operation results.
999
+ #
1000
+ def list_next(next_page_link, custom_headers:nil)
1001
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1002
+ response.body unless response.nil?
1003
+ end
1004
+
1005
+ #
1006
+ # Lists all the disk access resources under a subscription.
1007
+ #
1008
+ # @param next_page_link [String] The NextLink from the previous successful call
1009
+ # to List operation.
1010
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1011
+ # will be added to the HTTP request.
1012
+ #
1013
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1014
+ #
1015
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1016
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1017
+ end
1018
+
1019
+ #
1020
+ # Lists all the disk access resources under a subscription.
1021
+ #
1022
+ # @param next_page_link [String] The NextLink from the previous successful call
1023
+ # to List operation.
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 list_next_async(next_page_link, custom_headers:nil)
1030
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1031
+
1032
+
1033
+ request_headers = {}
1034
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1035
+
1036
+ # Set Headers
1037
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1038
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1039
+ path_template = '{nextLink}'
1040
+
1041
+ request_url = @base_url || @client.base_url
1042
+
1043
+ options = {
1044
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1045
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1046
+ headers: request_headers.merge(custom_headers || {}),
1047
+ base_url: request_url
1048
+ }
1049
+ promise = @client.make_request_async(:get, path_template, options)
1050
+
1051
+ promise = promise.then do |result|
1052
+ http_response = result.response
1053
+ status_code = http_response.status
1054
+ response_content = http_response.body
1055
+ unless status_code == 200
1056
+ error_model = JSON.load(response_content)
1057
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1058
+ end
1059
+
1060
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1061
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1062
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1063
+ # Deserialize Response
1064
+ if status_code == 200
1065
+ begin
1066
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1067
+ result_mapper = Azure::Compute::Mgmt::V2020_06_30::Models::DiskAccessList.mapper()
1068
+ result.body = @client.deserialize(result_mapper, parsed_response)
1069
+ rescue Exception => e
1070
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1071
+ end
1072
+ end
1073
+
1074
+ result
1075
+ end
1076
+
1077
+ promise.execute
1078
+ end
1079
+
1080
+ #
1081
+ # Lists all the disk access resources under a resource group.
1082
+ #
1083
+ # @param resource_group_name [String] The name of the resource group.
1084
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1085
+ # will be added to the HTTP request.
1086
+ #
1087
+ # @return [DiskAccessList] which provide lazy access to pages of the response.
1088
+ #
1089
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1090
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1091
+ unless response.nil?
1092
+ page = response.body
1093
+ page.next_method = Proc.new do |next_page_link|
1094
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1095
+ end
1096
+ page
1097
+ end
1098
+ end
1099
+
1100
+ #
1101
+ # Lists all the disk access resources under a subscription.
1102
+ #
1103
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1104
+ # will be added to the HTTP request.
1105
+ #
1106
+ # @return [DiskAccessList] which provide lazy access to pages of the response.
1107
+ #
1108
+ def list_as_lazy(custom_headers:nil)
1109
+ response = list_async(custom_headers:custom_headers).value!
1110
+ unless response.nil?
1111
+ page = response.body
1112
+ page.next_method = Proc.new do |next_page_link|
1113
+ list_next_async(next_page_link, custom_headers:custom_headers)
1114
+ end
1115
+ page
1116
+ end
1117
+ end
1118
+
1119
+ end
1120
+ end