azure_mgmt_compute 0.21.1 → 0.22.0

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