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,939 @@
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 SshPublicKeys
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the SshPublicKeys class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ComputeManagementClient] reference to the ComputeManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
26
+ # property in the response to get the next page of SSH public keys.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<SshPublicKeyResource>] operation results.
32
+ #
33
+ def list_by_subscription(custom_headers:nil)
34
+ first_page = list_by_subscription_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
40
+ # property in the response to get the next page of SSH public keys.
41
+ #
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_by_subscription_with_http_info(custom_headers:nil)
48
+ list_by_subscription_async(custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
53
+ # property in the response to get the next page of SSH public keys.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_by_subscription_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
63
+
64
+
65
+ request_headers = {}
66
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
67
+
68
+ # Set Headers
69
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys'
72
+
73
+ request_url = @base_url || @client.base_url
74
+
75
+ options = {
76
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
77
+ path_params: {'subscriptionId' => @client.subscription_id},
78
+ query_params: {'api-version' => @client.api_version},
79
+ headers: request_headers.merge(custom_headers || {}),
80
+ base_url: request_url
81
+ }
82
+ promise = @client.make_request_async(:get, path_template, options)
83
+
84
+ promise = promise.then do |result|
85
+ http_response = result.response
86
+ status_code = http_response.status
87
+ response_content = http_response.body
88
+ unless status_code == 200
89
+ error_model = JSON.load(response_content)
90
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
91
+ end
92
+
93
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
95
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
96
+ # Deserialize Response
97
+ if status_code == 200
98
+ begin
99
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
100
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeysGroupListResult.mapper()
101
+ result.body = @client.deserialize(result_mapper, parsed_response)
102
+ rescue Exception => e
103
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
104
+ end
105
+ end
106
+
107
+ result
108
+ end
109
+
110
+ promise.execute
111
+ end
112
+
113
+ #
114
+ # Lists all of the SSH public keys in the specified resource group. Use the
115
+ # nextLink property in the response to get the next page of SSH public keys.
116
+ #
117
+ # @param resource_group_name [String] The name of the resource group.
118
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
119
+ # will be added to the HTTP request.
120
+ #
121
+ # @return [Array<SshPublicKeyResource>] operation results.
122
+ #
123
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
124
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
125
+ first_page.get_all_items
126
+ end
127
+
128
+ #
129
+ # Lists all of the SSH public keys in the specified resource group. Use the
130
+ # nextLink property in the response to get the next page of SSH public keys.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
137
+ #
138
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
139
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
140
+ end
141
+
142
+ #
143
+ # Lists all of the SSH public keys in the specified resource group. Use the
144
+ # nextLink property in the response to get the next page of SSH public keys.
145
+ #
146
+ # @param resource_group_name [String] The name of the resource group.
147
+ # @param [Hash{String => String}] A hash of custom headers that will be added
148
+ # to the HTTP request.
149
+ #
150
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
151
+ #
152
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
153
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
154
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
155
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
156
+
157
+
158
+ request_headers = {}
159
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
160
+
161
+ # Set Headers
162
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
163
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
164
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys'
165
+
166
+ request_url = @base_url || @client.base_url
167
+
168
+ options = {
169
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
170
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
171
+ query_params: {'api-version' => @client.api_version},
172
+ headers: request_headers.merge(custom_headers || {}),
173
+ base_url: request_url
174
+ }
175
+ promise = @client.make_request_async(:get, path_template, options)
176
+
177
+ promise = promise.then do |result|
178
+ http_response = result.response
179
+ status_code = http_response.status
180
+ response_content = http_response.body
181
+ unless status_code == 200
182
+ error_model = JSON.load(response_content)
183
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
184
+ end
185
+
186
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
187
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
188
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
189
+ # Deserialize Response
190
+ if status_code == 200
191
+ begin
192
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
193
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeysGroupListResult.mapper()
194
+ result.body = @client.deserialize(result_mapper, parsed_response)
195
+ rescue Exception => e
196
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
197
+ end
198
+ end
199
+
200
+ result
201
+ end
202
+
203
+ promise.execute
204
+ end
205
+
206
+ #
207
+ # Creates a new SSH public key resource.
208
+ #
209
+ # @param resource_group_name [String] The name of the resource group.
210
+ # @param ssh_public_key_name [String] The name of the SSH public key.
211
+ # @param parameters [SshPublicKeyResource] Parameters supplied to create the
212
+ # SSH public key.
213
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
214
+ # will be added to the HTTP request.
215
+ #
216
+ # @return [SshPublicKeyResource] operation results.
217
+ #
218
+ def create(resource_group_name, ssh_public_key_name, parameters, custom_headers:nil)
219
+ response = create_async(resource_group_name, ssh_public_key_name, parameters, custom_headers:custom_headers).value!
220
+ response.body unless response.nil?
221
+ end
222
+
223
+ #
224
+ # Creates a new SSH public key resource.
225
+ #
226
+ # @param resource_group_name [String] The name of the resource group.
227
+ # @param ssh_public_key_name [String] The name of the SSH public key.
228
+ # @param parameters [SshPublicKeyResource] Parameters supplied to create the
229
+ # SSH public key.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
232
+ #
233
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
234
+ #
235
+ def create_with_http_info(resource_group_name, ssh_public_key_name, parameters, custom_headers:nil)
236
+ create_async(resource_group_name, ssh_public_key_name, parameters, custom_headers:custom_headers).value!
237
+ end
238
+
239
+ #
240
+ # Creates a new SSH public key resource.
241
+ #
242
+ # @param resource_group_name [String] The name of the resource group.
243
+ # @param ssh_public_key_name [String] The name of the SSH public key.
244
+ # @param parameters [SshPublicKeyResource] Parameters supplied to create the
245
+ # SSH public key.
246
+ # @param [Hash{String => String}] A hash of custom headers that will be added
247
+ # to the HTTP request.
248
+ #
249
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
250
+ #
251
+ def create_async(resource_group_name, ssh_public_key_name, parameters, custom_headers:nil)
252
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
253
+ fail ArgumentError, 'ssh_public_key_name is nil' if ssh_public_key_name.nil?
254
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
255
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
256
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
257
+
258
+
259
+ request_headers = {}
260
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
261
+
262
+ # Set Headers
263
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
264
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
265
+
266
+ # Serialize Request
267
+ request_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyResource.mapper()
268
+ request_content = @client.serialize(request_mapper, parameters)
269
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
270
+
271
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}'
272
+
273
+ request_url = @base_url || @client.base_url
274
+
275
+ options = {
276
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
277
+ path_params: {'resourceGroupName' => resource_group_name,'sshPublicKeyName' => ssh_public_key_name,'subscriptionId' => @client.subscription_id},
278
+ query_params: {'api-version' => @client.api_version},
279
+ body: request_content,
280
+ headers: request_headers.merge(custom_headers || {}),
281
+ base_url: request_url
282
+ }
283
+ promise = @client.make_request_async(:put, path_template, options)
284
+
285
+ promise = promise.then do |result|
286
+ http_response = result.response
287
+ status_code = http_response.status
288
+ response_content = http_response.body
289
+ unless status_code == 200 || status_code == 201
290
+ error_model = JSON.load(response_content)
291
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
292
+ end
293
+
294
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
295
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
296
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
297
+ # Deserialize Response
298
+ if status_code == 200
299
+ begin
300
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
301
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyResource.mapper()
302
+ result.body = @client.deserialize(result_mapper, parsed_response)
303
+ rescue Exception => e
304
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
305
+ end
306
+ end
307
+ # Deserialize Response
308
+ if status_code == 201
309
+ begin
310
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
311
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyResource.mapper()
312
+ result.body = @client.deserialize(result_mapper, parsed_response)
313
+ rescue Exception => e
314
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
315
+ end
316
+ end
317
+
318
+ result
319
+ end
320
+
321
+ promise.execute
322
+ end
323
+
324
+ #
325
+ # Updates a new SSH public key resource.
326
+ #
327
+ # @param resource_group_name [String] The name of the resource group.
328
+ # @param ssh_public_key_name [String] The name of the SSH public key.
329
+ # @param parameters [SshPublicKeyUpdateResource] Parameters supplied to update
330
+ # the SSH public key.
331
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
332
+ # will be added to the HTTP request.
333
+ #
334
+ # @return [SshPublicKeyResource] operation results.
335
+ #
336
+ def update(resource_group_name, ssh_public_key_name, parameters, custom_headers:nil)
337
+ response = update_async(resource_group_name, ssh_public_key_name, parameters, custom_headers:custom_headers).value!
338
+ response.body unless response.nil?
339
+ end
340
+
341
+ #
342
+ # Updates a new SSH public key resource.
343
+ #
344
+ # @param resource_group_name [String] The name of the resource group.
345
+ # @param ssh_public_key_name [String] The name of the SSH public key.
346
+ # @param parameters [SshPublicKeyUpdateResource] Parameters supplied to update
347
+ # the SSH public key.
348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
349
+ # will be added to the HTTP request.
350
+ #
351
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
352
+ #
353
+ def update_with_http_info(resource_group_name, ssh_public_key_name, parameters, custom_headers:nil)
354
+ update_async(resource_group_name, ssh_public_key_name, parameters, custom_headers:custom_headers).value!
355
+ end
356
+
357
+ #
358
+ # Updates a new SSH public key resource.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group.
361
+ # @param ssh_public_key_name [String] The name of the SSH public key.
362
+ # @param parameters [SshPublicKeyUpdateResource] Parameters supplied to update
363
+ # the SSH public key.
364
+ # @param [Hash{String => String}] A hash of custom headers that will be added
365
+ # to the HTTP request.
366
+ #
367
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
368
+ #
369
+ def update_async(resource_group_name, ssh_public_key_name, parameters, custom_headers:nil)
370
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
371
+ fail ArgumentError, 'ssh_public_key_name is nil' if ssh_public_key_name.nil?
372
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
373
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
374
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
375
+
376
+
377
+ request_headers = {}
378
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
379
+
380
+ # Set Headers
381
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
382
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
383
+
384
+ # Serialize Request
385
+ request_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyUpdateResource.mapper()
386
+ request_content = @client.serialize(request_mapper, parameters)
387
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
388
+
389
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}'
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: {'resourceGroupName' => resource_group_name,'sshPublicKeyName' => ssh_public_key_name,'subscriptionId' => @client.subscription_id},
396
+ query_params: {'api-version' => @client.api_version},
397
+ body: request_content,
398
+ headers: request_headers.merge(custom_headers || {}),
399
+ base_url: request_url
400
+ }
401
+ promise = @client.make_request_async(:patch, path_template, options)
402
+
403
+ promise = promise.then do |result|
404
+ http_response = result.response
405
+ status_code = http_response.status
406
+ response_content = http_response.body
407
+ unless status_code == 200
408
+ error_model = JSON.load(response_content)
409
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
410
+ end
411
+
412
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
413
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
414
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
415
+ # Deserialize Response
416
+ if status_code == 200
417
+ begin
418
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
419
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyResource.mapper()
420
+ result.body = @client.deserialize(result_mapper, parsed_response)
421
+ rescue Exception => e
422
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
423
+ end
424
+ end
425
+
426
+ result
427
+ end
428
+
429
+ promise.execute
430
+ end
431
+
432
+ #
433
+ # Delete an SSH public key.
434
+ #
435
+ # @param resource_group_name [String] The name of the resource group.
436
+ # @param ssh_public_key_name [String] The name of the SSH public key.
437
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
438
+ # will be added to the HTTP request.
439
+ #
440
+ #
441
+ def delete(resource_group_name, ssh_public_key_name, custom_headers:nil)
442
+ response = delete_async(resource_group_name, ssh_public_key_name, custom_headers:custom_headers).value!
443
+ nil
444
+ end
445
+
446
+ #
447
+ # Delete an SSH public key.
448
+ #
449
+ # @param resource_group_name [String] The name of the resource group.
450
+ # @param ssh_public_key_name [String] The name of the SSH public key.
451
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
452
+ # will be added to the HTTP request.
453
+ #
454
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
455
+ #
456
+ def delete_with_http_info(resource_group_name, ssh_public_key_name, custom_headers:nil)
457
+ delete_async(resource_group_name, ssh_public_key_name, custom_headers:custom_headers).value!
458
+ end
459
+
460
+ #
461
+ # Delete an SSH public key.
462
+ #
463
+ # @param resource_group_name [String] The name of the resource group.
464
+ # @param ssh_public_key_name [String] The name of the SSH public key.
465
+ # @param [Hash{String => String}] A hash of custom headers that will be added
466
+ # to the HTTP request.
467
+ #
468
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
469
+ #
470
+ def delete_async(resource_group_name, ssh_public_key_name, custom_headers:nil)
471
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
472
+ fail ArgumentError, 'ssh_public_key_name is nil' if ssh_public_key_name.nil?
473
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
474
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
475
+
476
+
477
+ request_headers = {}
478
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
479
+
480
+ # Set Headers
481
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
482
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
483
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}'
484
+
485
+ request_url = @base_url || @client.base_url
486
+
487
+ options = {
488
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
489
+ path_params: {'resourceGroupName' => resource_group_name,'sshPublicKeyName' => ssh_public_key_name,'subscriptionId' => @client.subscription_id},
490
+ query_params: {'api-version' => @client.api_version},
491
+ headers: request_headers.merge(custom_headers || {}),
492
+ base_url: request_url
493
+ }
494
+ promise = @client.make_request_async(:delete, path_template, options)
495
+
496
+ promise = promise.then do |result|
497
+ http_response = result.response
498
+ status_code = http_response.status
499
+ response_content = http_response.body
500
+ unless status_code == 200 || status_code == 204
501
+ error_model = JSON.load(response_content)
502
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
503
+ end
504
+
505
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
506
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
507
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
508
+
509
+ result
510
+ end
511
+
512
+ promise.execute
513
+ end
514
+
515
+ #
516
+ # Retrieves information about an SSH public key.
517
+ #
518
+ # @param resource_group_name [String] The name of the resource group.
519
+ # @param ssh_public_key_name [String] The name of the SSH public key.
520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
521
+ # will be added to the HTTP request.
522
+ #
523
+ # @return [SshPublicKeyResource] operation results.
524
+ #
525
+ def get(resource_group_name, ssh_public_key_name, custom_headers:nil)
526
+ response = get_async(resource_group_name, ssh_public_key_name, custom_headers:custom_headers).value!
527
+ response.body unless response.nil?
528
+ end
529
+
530
+ #
531
+ # Retrieves information about an SSH public key.
532
+ #
533
+ # @param resource_group_name [String] The name of the resource group.
534
+ # @param ssh_public_key_name [String] The name of the SSH public key.
535
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
536
+ # will be added to the HTTP request.
537
+ #
538
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
539
+ #
540
+ def get_with_http_info(resource_group_name, ssh_public_key_name, custom_headers:nil)
541
+ get_async(resource_group_name, ssh_public_key_name, custom_headers:custom_headers).value!
542
+ end
543
+
544
+ #
545
+ # Retrieves information about an SSH public key.
546
+ #
547
+ # @param resource_group_name [String] The name of the resource group.
548
+ # @param ssh_public_key_name [String] The name of the SSH public key.
549
+ # @param [Hash{String => String}] A hash of custom headers that will be added
550
+ # to the HTTP request.
551
+ #
552
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
553
+ #
554
+ def get_async(resource_group_name, ssh_public_key_name, custom_headers:nil)
555
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
556
+ fail ArgumentError, 'ssh_public_key_name is nil' if ssh_public_key_name.nil?
557
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
558
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
559
+
560
+
561
+ request_headers = {}
562
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
563
+
564
+ # Set Headers
565
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
566
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
567
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}'
568
+
569
+ request_url = @base_url || @client.base_url
570
+
571
+ options = {
572
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
573
+ path_params: {'resourceGroupName' => resource_group_name,'sshPublicKeyName' => ssh_public_key_name,'subscriptionId' => @client.subscription_id},
574
+ query_params: {'api-version' => @client.api_version},
575
+ headers: request_headers.merge(custom_headers || {}),
576
+ base_url: request_url
577
+ }
578
+ promise = @client.make_request_async(:get, path_template, options)
579
+
580
+ promise = promise.then do |result|
581
+ http_response = result.response
582
+ status_code = http_response.status
583
+ response_content = http_response.body
584
+ unless status_code == 200
585
+ error_model = JSON.load(response_content)
586
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
587
+ end
588
+
589
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
590
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
591
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
592
+ # Deserialize Response
593
+ if status_code == 200
594
+ begin
595
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
596
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyResource.mapper()
597
+ result.body = @client.deserialize(result_mapper, parsed_response)
598
+ rescue Exception => e
599
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
600
+ end
601
+ end
602
+
603
+ result
604
+ end
605
+
606
+ promise.execute
607
+ end
608
+
609
+ #
610
+ # Generates and returns a public/private key pair and populates the SSH public
611
+ # key resource with the public key. The length of the key will be 3072 bits.
612
+ # This operation can only be performed once per SSH public key resource.
613
+ #
614
+ # @param resource_group_name [String] The name of the resource group.
615
+ # @param ssh_public_key_name [String] The name of the SSH public key.
616
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
617
+ # will be added to the HTTP request.
618
+ #
619
+ # @return [SshPublicKeyGenerateKeyPairResult] operation results.
620
+ #
621
+ def generate_key_pair(resource_group_name, ssh_public_key_name, custom_headers:nil)
622
+ response = generate_key_pair_async(resource_group_name, ssh_public_key_name, custom_headers:custom_headers).value!
623
+ response.body unless response.nil?
624
+ end
625
+
626
+ #
627
+ # Generates and returns a public/private key pair and populates the SSH public
628
+ # key resource with the public key. The length of the key will be 3072 bits.
629
+ # This operation can only be performed once per SSH public key resource.
630
+ #
631
+ # @param resource_group_name [String] The name of the resource group.
632
+ # @param ssh_public_key_name [String] The name of the SSH public key.
633
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
634
+ # will be added to the HTTP request.
635
+ #
636
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
637
+ #
638
+ def generate_key_pair_with_http_info(resource_group_name, ssh_public_key_name, custom_headers:nil)
639
+ generate_key_pair_async(resource_group_name, ssh_public_key_name, custom_headers:custom_headers).value!
640
+ end
641
+
642
+ #
643
+ # Generates and returns a public/private key pair and populates the SSH public
644
+ # key resource with the public key. The length of the key will be 3072 bits.
645
+ # This operation can only be performed once per SSH public key resource.
646
+ #
647
+ # @param resource_group_name [String] The name of the resource group.
648
+ # @param ssh_public_key_name [String] The name of the SSH public key.
649
+ # @param [Hash{String => String}] A hash of custom headers that will be added
650
+ # to the HTTP request.
651
+ #
652
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
653
+ #
654
+ def generate_key_pair_async(resource_group_name, ssh_public_key_name, custom_headers:nil)
655
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
656
+ fail ArgumentError, 'ssh_public_key_name is nil' if ssh_public_key_name.nil?
657
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
658
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
659
+
660
+
661
+ request_headers = {}
662
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
663
+
664
+ # Set Headers
665
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
666
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
667
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair'
668
+
669
+ request_url = @base_url || @client.base_url
670
+
671
+ options = {
672
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
673
+ path_params: {'resourceGroupName' => resource_group_name,'sshPublicKeyName' => ssh_public_key_name,'subscriptionId' => @client.subscription_id},
674
+ query_params: {'api-version' => @client.api_version},
675
+ headers: request_headers.merge(custom_headers || {}),
676
+ base_url: request_url
677
+ }
678
+ promise = @client.make_request_async(:post, path_template, options)
679
+
680
+ promise = promise.then do |result|
681
+ http_response = result.response
682
+ status_code = http_response.status
683
+ response_content = http_response.body
684
+ unless status_code == 200
685
+ error_model = JSON.load(response_content)
686
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
687
+ end
688
+
689
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
690
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
691
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
692
+ # Deserialize Response
693
+ if status_code == 200
694
+ begin
695
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
696
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeyGenerateKeyPairResult.mapper()
697
+ result.body = @client.deserialize(result_mapper, parsed_response)
698
+ rescue Exception => e
699
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
700
+ end
701
+ end
702
+
703
+ result
704
+ end
705
+
706
+ promise.execute
707
+ end
708
+
709
+ #
710
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
711
+ # property in the response to get the next page of SSH public keys.
712
+ #
713
+ # @param next_page_link [String] The NextLink from the previous successful call
714
+ # to List operation.
715
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
716
+ # will be added to the HTTP request.
717
+ #
718
+ # @return [SshPublicKeysGroupListResult] operation results.
719
+ #
720
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
721
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
722
+ response.body unless response.nil?
723
+ end
724
+
725
+ #
726
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
727
+ # property in the response to get the next page of SSH public keys.
728
+ #
729
+ # @param next_page_link [String] The NextLink from the previous successful call
730
+ # to List operation.
731
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
732
+ # will be added to the HTTP request.
733
+ #
734
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
735
+ #
736
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
737
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
738
+ end
739
+
740
+ #
741
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
742
+ # property in the response to get the next page of SSH public keys.
743
+ #
744
+ # @param next_page_link [String] The NextLink from the previous successful call
745
+ # to List operation.
746
+ # @param [Hash{String => String}] A hash of custom headers that will be added
747
+ # to the HTTP request.
748
+ #
749
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
750
+ #
751
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
752
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
753
+
754
+
755
+ request_headers = {}
756
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
757
+
758
+ # Set Headers
759
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
760
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
761
+ path_template = '{nextLink}'
762
+
763
+ request_url = @base_url || @client.base_url
764
+
765
+ options = {
766
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
767
+ skip_encoding_path_params: {'nextLink' => next_page_link},
768
+ headers: request_headers.merge(custom_headers || {}),
769
+ base_url: request_url
770
+ }
771
+ promise = @client.make_request_async(:get, path_template, options)
772
+
773
+ promise = promise.then do |result|
774
+ http_response = result.response
775
+ status_code = http_response.status
776
+ response_content = http_response.body
777
+ unless status_code == 200
778
+ error_model = JSON.load(response_content)
779
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
780
+ end
781
+
782
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
783
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
784
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
785
+ # Deserialize Response
786
+ if status_code == 200
787
+ begin
788
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
789
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeysGroupListResult.mapper()
790
+ result.body = @client.deserialize(result_mapper, parsed_response)
791
+ rescue Exception => e
792
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
793
+ end
794
+ end
795
+
796
+ result
797
+ end
798
+
799
+ promise.execute
800
+ end
801
+
802
+ #
803
+ # Lists all of the SSH public keys in the specified resource group. Use the
804
+ # nextLink property in the response to get the next page of SSH public keys.
805
+ #
806
+ # @param next_page_link [String] The NextLink from the previous successful call
807
+ # to List operation.
808
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
809
+ # will be added to the HTTP request.
810
+ #
811
+ # @return [SshPublicKeysGroupListResult] operation results.
812
+ #
813
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
814
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
815
+ response.body unless response.nil?
816
+ end
817
+
818
+ #
819
+ # Lists all of the SSH public keys in the specified resource group. Use the
820
+ # nextLink property in the response to get the next page of SSH public keys.
821
+ #
822
+ # @param next_page_link [String] The NextLink from the previous successful call
823
+ # to List operation.
824
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
825
+ # will be added to the HTTP request.
826
+ #
827
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
828
+ #
829
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
830
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
831
+ end
832
+
833
+ #
834
+ # Lists all of the SSH public keys in the specified resource group. Use the
835
+ # nextLink property in the response to get the next page of SSH public keys.
836
+ #
837
+ # @param next_page_link [String] The NextLink from the previous successful call
838
+ # to List operation.
839
+ # @param [Hash{String => String}] A hash of custom headers that will be added
840
+ # to the HTTP request.
841
+ #
842
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
843
+ #
844
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
845
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
846
+
847
+
848
+ request_headers = {}
849
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
850
+
851
+ # Set Headers
852
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
853
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
854
+ path_template = '{nextLink}'
855
+
856
+ request_url = @base_url || @client.base_url
857
+
858
+ options = {
859
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
860
+ skip_encoding_path_params: {'nextLink' => next_page_link},
861
+ headers: request_headers.merge(custom_headers || {}),
862
+ base_url: request_url
863
+ }
864
+ promise = @client.make_request_async(:get, path_template, options)
865
+
866
+ promise = promise.then do |result|
867
+ http_response = result.response
868
+ status_code = http_response.status
869
+ response_content = http_response.body
870
+ unless status_code == 200
871
+ error_model = JSON.load(response_content)
872
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
873
+ end
874
+
875
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
876
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
877
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
878
+ # Deserialize Response
879
+ if status_code == 200
880
+ begin
881
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
882
+ result_mapper = Azure::Compute::Mgmt::V2020_12_01::Models::SshPublicKeysGroupListResult.mapper()
883
+ result.body = @client.deserialize(result_mapper, parsed_response)
884
+ rescue Exception => e
885
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
886
+ end
887
+ end
888
+
889
+ result
890
+ end
891
+
892
+ promise.execute
893
+ end
894
+
895
+ #
896
+ # Lists all of the SSH public keys in the subscription. Use the nextLink
897
+ # property in the response to get the next page of SSH public keys.
898
+ #
899
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
900
+ # will be added to the HTTP request.
901
+ #
902
+ # @return [SshPublicKeysGroupListResult] which provide lazy access to pages of
903
+ # the response.
904
+ #
905
+ def list_by_subscription_as_lazy(custom_headers:nil)
906
+ response = list_by_subscription_async(custom_headers:custom_headers).value!
907
+ unless response.nil?
908
+ page = response.body
909
+ page.next_method = Proc.new do |next_page_link|
910
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
911
+ end
912
+ page
913
+ end
914
+ end
915
+
916
+ #
917
+ # Lists all of the SSH public keys in the specified resource group. Use the
918
+ # nextLink property in the response to get the next page of SSH public keys.
919
+ #
920
+ # @param resource_group_name [String] The name of the resource group.
921
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
922
+ # will be added to the HTTP request.
923
+ #
924
+ # @return [SshPublicKeysGroupListResult] which provide lazy access to pages of
925
+ # the response.
926
+ #
927
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
928
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
929
+ unless response.nil?
930
+ page = response.body
931
+ page.next_method = Proc.new do |next_page_link|
932
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
933
+ end
934
+ page
935
+ end
936
+ end
937
+
938
+ end
939
+ end