azure_mgmt_compute 0.20.0 → 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) 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.rb +94 -93
  17. data/lib/2019-12-01/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  18. data/lib/2019-12-01/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb +7 -7
  19. data/lib/2019-12-01/generated/azure_mgmt_compute/models/user_artifact_manage.rb +74 -0
  20. data/lib/2019-12-01/generated/azure_mgmt_compute/models/user_artifact_source.rb +10 -9
  21. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +12 -4
  22. data/lib/2019-12-01/generated/azure_mgmt_compute/virtual_machines.rb +36 -8
  23. data/lib/2020-06-01/generated/azure_mgmt_compute.rb +102 -92
  24. data/lib/2020-06-01/generated/azure_mgmt_compute/compute_management_client.rb +6 -1
  25. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group.rb +1 -1
  26. data/lib/2020-06-01/generated/azure_mgmt_compute/models/dedicated_host_group_update.rb +1 -1
  27. data/lib/2020-06-01/generated/azure_mgmt_compute/models/execution_state.rb +21 -0
  28. data/lib/2020-06-01/generated/azure_mgmt_compute/models/hardware_profile.rb +20 -15
  29. data/lib/2020-06-01/generated/azure_mgmt_compute/models/log_analytics_input_base.rb +22 -0
  30. data/lib/2020-06-01/generated/azure_mgmt_compute/models/request_rate_by_interval_input.rb +16 -0
  31. data/lib/2020-06-01/generated/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
  32. data/lib/2020-06-01/generated/azure_mgmt_compute/models/throttled_requests_input.rb +16 -0
  33. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine.rb +8 -7
  34. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command.rb +241 -0
  35. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_instance_view.rb +135 -0
  36. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_script_source.rb +68 -0
  37. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_command_update.rb +206 -0
  38. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_run_commands_list_result.rb +98 -0
  39. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +12 -0
  40. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_update_network_configuration.rb +12 -0
  41. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +8 -7
  42. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension.rb +190 -0
  43. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextension_update.rb +164 -0
  44. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_list_result.rb +57 -0
  45. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +8 -7
  46. data/lib/2020-06-01/generated/azure_mgmt_compute/models/virtual_machine_update.rb +8 -7
  47. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_run_commands.rb +790 -0
  48. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmextensions.rb +35 -35
  49. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vmrun_commands.rb +827 -0
  50. data/lib/2020-06-01/generated/azure_mgmt_compute/virtual_machines.rb +5 -5
  51. data/lib/2020-06-30/generated/azure_mgmt_compute/compute_management_client.rb +1 -1
  52. data/lib/2020-09-30-preview/generated/azure_mgmt_compute.rb +106 -0
  53. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/compute_management_client.rb +165 -0
  54. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/galleries.rb +994 -0
  55. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_application_versions.rb +915 -0
  56. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_applications.rb +856 -0
  57. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_image_versions.rb +911 -0
  58. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_images.rb +856 -0
  59. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/gallery_sharing_profile.rb +189 -0
  60. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/aggregated_replication_state.rb +18 -0
  61. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  62. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  63. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/data_disk_image_encryption.rb +57 -0
  64. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/disallowed.rb +54 -0
  65. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/disk_image_encryption.rb +47 -0
  66. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/encryption_images.rb +69 -0
  67. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery.rb +137 -0
  68. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application.rb +161 -0
  69. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_list.rb +100 -0
  70. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_update.rb +153 -0
  71. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version.rb +127 -0
  72. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_list.rb +101 -0
  73. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_publishing_profile.rb +130 -0
  74. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_application_version_update.rb +119 -0
  75. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_publishing_profile_base.rb +120 -0
  76. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_source.rb +47 -0
  77. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_artifact_version_source.rb +60 -0
  78. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_data_disk_image.rb +76 -0
  79. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_disk_image.rb +74 -0
  80. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_identifier.rb +48 -0
  81. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image.rb +271 -0
  82. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_feature.rb +57 -0
  83. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_identifier.rb +68 -0
  84. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_list.rb +100 -0
  85. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_update.rb +263 -0
  86. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version.rb +139 -0
  87. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_list.rb +100 -0
  88. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_publishing_profile.rb +93 -0
  89. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_storage_profile.rb +79 -0
  90. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_image_version_update.rb +131 -0
  91. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_list.rb +99 -0
  92. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_osdisk_image.rb +62 -0
  93. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_sharing_permission_types.rb +16 -0
  94. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/gallery_update.rb +129 -0
  95. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/host_caching.rb +17 -0
  96. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  97. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/image_purchase_plan.rb +69 -0
  98. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  99. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/managed_artifact.rb +46 -0
  100. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
  101. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  102. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/osdisk_image_encryption.rb +43 -0
  103. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/pir_resource.rb +59 -0
  104. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/pir_shared_gallery_resource.rb +64 -0
  105. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/recommended_machine_configuration.rb +60 -0
  106. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/regional_replication_status.rb +86 -0
  107. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_state.rb +18 -0
  108. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status.rb +71 -0
  109. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/replication_status_types.rb +15 -0
  110. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/resource.rb +110 -0
  111. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/resource_range.rb +57 -0
  112. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/select_permissions.rb +15 -0
  113. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery.rb +62 -0
  114. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image.rb +186 -0
  115. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_list.rb +100 -0
  116. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version.rb +88 -0
  117. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_image_version_list.rb +101 -0
  118. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_gallery_list.rb +99 -0
  119. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/shared_to_values.rb +15 -0
  120. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile.rb +70 -0
  121. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group.rb +69 -0
  122. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_profile_group_types.rb +16 -0
  123. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update.rb +69 -0
  124. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/sharing_update_operation_types.rb +17 -0
  125. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/storage_account_type.rb +17 -0
  126. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/target_region.rb +83 -0
  127. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/update_resource_definition.rb +90 -0
  128. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_manage.rb +74 -0
  129. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/models/user_artifact_source.rb +59 -0
  130. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
  131. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_galleries.rb +332 -0
  132. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_image_versions.rb +366 -0
  133. data/lib/2020-09-30-preview/generated/azure_mgmt_compute/shared_gallery_images.rb +344 -0
  134. data/lib/2020-09-30/generated/azure_mgmt_compute.rb +89 -0
  135. data/lib/2020-09-30/generated/azure_mgmt_compute/compute_management_client.rb +149 -0
  136. data/lib/2020-09-30/generated/azure_mgmt_compute/disk_accesses.rb +1804 -0
  137. data/lib/2020-09-30/generated/azure_mgmt_compute/disk_encryption_sets.rb +1236 -0
  138. data/lib/2020-09-30/generated/azure_mgmt_compute/disk_restore_point_operations.rb +372 -0
  139. data/lib/2020-09-30/generated/azure_mgmt_compute/disks.rb +1294 -0
  140. data/lib/2020-09-30/generated/azure_mgmt_compute/models/access_level.rb +17 -0
  141. data/lib/2020-09-30/generated/azure_mgmt_compute/models/access_uri.rb +47 -0
  142. data/lib/2020-09-30/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  143. data/lib/2020-09-30/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  144. data/lib/2020-09-30/generated/azure_mgmt_compute/models/creation_data.rb +150 -0
  145. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk.rb +462 -0
  146. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access.rb +133 -0
  147. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access_list.rb +100 -0
  148. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_access_update.rb +54 -0
  149. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_create_option.rb +21 -0
  150. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set.rb +160 -0
  151. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_identity_type.rb +16 -0
  152. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_list.rb +100 -0
  153. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_type.rb +16 -0
  154. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_encryption_set_update.rb +79 -0
  155. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_list.rb +99 -0
  156. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_restore_point.rb +164 -0
  157. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_restore_point_list.rb +100 -0
  158. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_sku.rb +61 -0
  159. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_state.rb +20 -0
  160. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_storage_account_types.rb +18 -0
  161. data/lib/2020-09-30/generated/azure_mgmt_compute/models/disk_update.rb +251 -0
  162. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption.rb +60 -0
  163. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_set_identity.rb +81 -0
  164. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_settings_collection.rb +85 -0
  165. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_settings_element.rb +62 -0
  166. data/lib/2020-09-30/generated/azure_mgmt_compute/models/encryption_type.rb +17 -0
  167. data/lib/2020-09-30/generated/azure_mgmt_compute/models/extended_location.rb +58 -0
  168. data/lib/2020-09-30/generated/azure_mgmt_compute/models/extended_location_types.rb +15 -0
  169. data/lib/2020-09-30/generated/azure_mgmt_compute/models/grant_access_data.rb +58 -0
  170. data/lib/2020-09-30/generated/azure_mgmt_compute/models/hyper_vgeneration.rb +16 -0
  171. data/lib/2020-09-30/generated/azure_mgmt_compute/models/image_disk_reference.rb +60 -0
  172. data/lib/2020-09-30/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  173. data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_for_disk_encryption_set.rb +61 -0
  174. data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +60 -0
  175. data/lib/2020-09-30/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +59 -0
  176. data/lib/2020-09-30/generated/azure_mgmt_compute/models/network_access_policy.rb +17 -0
  177. data/lib/2020-09-30/generated/azure_mgmt_compute/models/operating_system_types.rb +16 -0
  178. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint.rb +47 -0
  179. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection.rb +110 -0
  180. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection_list_result.rb +100 -0
  181. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_connection_provisioning_state.rb +18 -0
  182. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_endpoint_service_connection_status.rb +17 -0
  183. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_resource.rb +123 -0
  184. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_resource_list_result.rb +55 -0
  185. data/lib/2020-09-30/generated/azure_mgmt_compute/models/private_link_service_connection_state.rb +72 -0
  186. data/lib/2020-09-30/generated/azure_mgmt_compute/models/proxy_only_resource.rb +71 -0
  187. data/lib/2020-09-30/generated/azure_mgmt_compute/models/purchase_plan.rb +82 -0
  188. data/lib/2020-09-30/generated/azure_mgmt_compute/models/resource.rb +110 -0
  189. data/lib/2020-09-30/generated/azure_mgmt_compute/models/resource_uri_list.rb +100 -0
  190. data/lib/2020-09-30/generated/azure_mgmt_compute/models/share_info_element.rb +49 -0
  191. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot.rb +316 -0
  192. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_list.rb +99 -0
  193. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_sku.rb +62 -0
  194. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_storage_account_types.rb +17 -0
  195. data/lib/2020-09-30/generated/azure_mgmt_compute/models/snapshot_update.rb +145 -0
  196. data/lib/2020-09-30/generated/azure_mgmt_compute/models/source_vault.rb +47 -0
  197. data/lib/2020-09-30/generated/azure_mgmt_compute/module_definition.rb +9 -0
  198. data/lib/2020-09-30/generated/azure_mgmt_compute/snapshots.rb +1294 -0
  199. data/lib/2020-10-01-preview/generated/azure_mgmt_compute.rb +73 -0
  200. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb +1091 -0
  201. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_roles.rb +343 -0
  202. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_services.rb +1870 -0
  203. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/cloud_services_update_domain.rb +486 -0
  204. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/compute_management_client.rb +145 -0
  205. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/api_error.rb +100 -0
  206. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/api_error_base.rb +68 -0
  207. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service.rb +113 -0
  208. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_profile.rb +55 -0
  209. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_properties.rb +180 -0
  210. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_instance_view.rb +81 -0
  211. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_list_result.rb +98 -0
  212. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_network_profile.rb +68 -0
  213. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_os_profile.rb +56 -0
  214. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_properties.rb +176 -0
  215. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role.rb +107 -0
  216. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_list_result.rb +98 -0
  217. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile.rb +56 -0
  218. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile_properties.rb +58 -0
  219. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_properties.rb +49 -0
  220. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_sku.rb +72 -0
  221. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_update.rb +55 -0
  222. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_upgrade_mode.rb +17 -0
  223. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_and_secret_reference.rb +59 -0
  224. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_certificate.rb +48 -0
  225. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_secret_group.rb +69 -0
  226. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/extension.rb +58 -0
  227. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/inner_error.rb +57 -0
  228. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_sku.rb +60 -0
  229. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_statuses_summary.rb +56 -0
  230. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  231. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration.rb +58 -0
  232. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration_properties.rb +56 -0
  233. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration.rb +59 -0
  234. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration_properties.rb +72 -0
  235. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/resource_instance_view_status.rb +97 -0
  236. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance.rb +128 -0
  237. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_instance_view.rb +95 -0
  238. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_list_result.rb +98 -0
  239. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_network_profile.rb +57 -0
  240. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_properties.rb +60 -0
  241. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/role_instances.rb +55 -0
  242. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/status_code_count.rb +60 -0
  243. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/status_level_types.rb +17 -0
  244. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/sub_resource.rb +47 -0
  245. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain.rb +59 -0
  246. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain_list_result.rb +98 -0
  247. data/lib/2020-10-01-preview/generated/azure_mgmt_compute/module_definition.rb +9 -0
  248. data/lib/azure_mgmt_compute.rb +3 -0
  249. data/lib/profiles/latest/modules/compute_profile_module.rb +700 -468
  250. data/lib/version.rb +1 -1
  251. metadata +209 -2
@@ -0,0 +1,73 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2020-10-01-preview/generated/azure_mgmt_compute/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Compute::Mgmt::V2020_10_01_preview
23
+ autoload :CloudServiceRoleInstances, '2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_role_instances.rb'
24
+ autoload :CloudServiceRoles, '2020-10-01-preview/generated/azure_mgmt_compute/cloud_service_roles.rb'
25
+ autoload :CloudServices, '2020-10-01-preview/generated/azure_mgmt_compute/cloud_services.rb'
26
+ autoload :CloudServicesUpdateDomain, '2020-10-01-preview/generated/azure_mgmt_compute/cloud_services_update_domain.rb'
27
+ autoload :ComputeManagementClient, '2020-10-01-preview/generated/azure_mgmt_compute/compute_management_client.rb'
28
+
29
+ module Models
30
+ autoload :CloudServiceVaultSecretGroup, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_secret_group.rb'
31
+ autoload :CloudServiceOsProfile, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_os_profile.rb'
32
+ autoload :InnerError, '2020-10-01-preview/generated/azure_mgmt_compute/models/inner_error.rb'
33
+ autoload :LoadBalancerFrontendIPConfigurationProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration_properties.rb'
34
+ autoload :LoadBalancerFrontendIPConfiguration, '2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_frontend_ipconfiguration.rb'
35
+ autoload :SubResource, '2020-10-01-preview/generated/azure_mgmt_compute/models/sub_resource.rb'
36
+ autoload :LoadBalancerConfigurationProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration_properties.rb'
37
+ autoload :ResourceInstanceViewStatus, '2020-10-01-preview/generated/azure_mgmt_compute/models/resource_instance_view_status.rb'
38
+ autoload :LoadBalancerConfiguration, '2020-10-01-preview/generated/azure_mgmt_compute/models/load_balancer_configuration.rb'
39
+ autoload :RoleInstanceProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_properties.rb'
40
+ autoload :CloudServiceNetworkProfile, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_network_profile.rb'
41
+ autoload :RoleInstanceListResult, '2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_list_result.rb'
42
+ autoload :CloudServiceVaultAndSecretReference, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_and_secret_reference.rb'
43
+ autoload :CloudServiceRoleProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_properties.rb'
44
+ autoload :CloudServiceExtensionProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_properties.rb'
45
+ autoload :CloudServiceRoleListResult, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_list_result.rb'
46
+ autoload :Extension, '2020-10-01-preview/generated/azure_mgmt_compute/models/extension.rb'
47
+ autoload :CloudServiceRoleProfile, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile.rb'
48
+ autoload :CloudServiceExtensionProfile, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_extension_profile.rb'
49
+ autoload :ApiErrorBase, '2020-10-01-preview/generated/azure_mgmt_compute/models/api_error_base.rb'
50
+ autoload :CloudServiceProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_properties.rb'
51
+ autoload :InstanceSku, '2020-10-01-preview/generated/azure_mgmt_compute/models/instance_sku.rb'
52
+ autoload :CloudService, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service.rb'
53
+ autoload :RoleInstanceInstanceView, '2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_instance_view.rb'
54
+ autoload :CloudServiceUpdate, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_update.rb'
55
+ autoload :CloudServiceRoleSku, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_sku.rb'
56
+ autoload :StatusCodeCount, '2020-10-01-preview/generated/azure_mgmt_compute/models/status_code_count.rb'
57
+ autoload :CloudServiceRoleProfileProperties, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role_profile_properties.rb'
58
+ autoload :InstanceViewStatusesSummary, '2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_statuses_summary.rb'
59
+ autoload :ApiError, '2020-10-01-preview/generated/azure_mgmt_compute/models/api_error.rb'
60
+ autoload :CloudServiceInstanceView, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_instance_view.rb'
61
+ autoload :RoleInstance, '2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance.rb'
62
+ autoload :CloudServiceListResult, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_list_result.rb'
63
+ autoload :CloudServiceVaultCertificate, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_vault_certificate.rb'
64
+ autoload :RoleInstances, '2020-10-01-preview/generated/azure_mgmt_compute/models/role_instances.rb'
65
+ autoload :CloudServiceRole, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_role.rb'
66
+ autoload :UpdateDomain, '2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain.rb'
67
+ autoload :RoleInstanceNetworkProfile, '2020-10-01-preview/generated/azure_mgmt_compute/models/role_instance_network_profile.rb'
68
+ autoload :UpdateDomainListResult, '2020-10-01-preview/generated/azure_mgmt_compute/models/update_domain_list_result.rb'
69
+ autoload :StatusLevelTypes, '2020-10-01-preview/generated/azure_mgmt_compute/models/status_level_types.rb'
70
+ autoload :CloudServiceUpgradeMode, '2020-10-01-preview/generated/azure_mgmt_compute/models/cloud_service_upgrade_mode.rb'
71
+ autoload :InstanceViewTypes, '2020-10-01-preview/generated/azure_mgmt_compute/models/instance_view_types.rb'
72
+ end
73
+ end
@@ -0,0 +1,1091 @@
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_10_01_preview
7
+ #
8
+ # Compute Client
9
+ #
10
+ class CloudServiceRoleInstances
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the CloudServiceRoleInstances 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
+ # Deletes a role instance from a cloud service.
26
+ #
27
+ # @param role_instance_name [String] Name of the role instance.
28
+ # @param resource_group_name [String]
29
+ # @param cloud_service_name [String]
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ def delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
34
+ response = delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
35
+ nil
36
+ end
37
+
38
+ #
39
+ # @param role_instance_name [String] Name of the role instance.
40
+ # @param resource_group_name [String]
41
+ # @param cloud_service_name [String]
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [Concurrent::Promise] promise which provides async access to http
46
+ # response.
47
+ #
48
+ def delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
49
+ # Send request
50
+ promise = begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers)
51
+
52
+ promise = promise.then do |response|
53
+ # Defining deserialization method.
54
+ deserialize_method = lambda do |parsed_response|
55
+ end
56
+
57
+ # Waiting for response.
58
+ @client.get_long_running_operation_result(response, deserialize_method)
59
+ end
60
+
61
+ promise
62
+ end
63
+
64
+ #
65
+ # Gets a role instance from a cloud service.
66
+ #
67
+ # @param role_instance_name [String] Name of the role instance.
68
+ # @param resource_group_name [String]
69
+ # @param cloud_service_name [String]
70
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
71
+ # operation. Possible values include: 'instanceView'
72
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
73
+ # will be added to the HTTP request.
74
+ #
75
+ # @return [RoleInstance] operation results.
76
+ #
77
+ def get(role_instance_name, resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
78
+ response = get_async(role_instance_name, resource_group_name, cloud_service_name, expand:expand, custom_headers:custom_headers).value!
79
+ response.body unless response.nil?
80
+ end
81
+
82
+ #
83
+ # Gets a role instance from a cloud service.
84
+ #
85
+ # @param role_instance_name [String] Name of the role instance.
86
+ # @param resource_group_name [String]
87
+ # @param cloud_service_name [String]
88
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
89
+ # operation. Possible values include: 'instanceView'
90
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
91
+ # will be added to the HTTP request.
92
+ #
93
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
94
+ #
95
+ def get_with_http_info(role_instance_name, resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
96
+ get_async(role_instance_name, resource_group_name, cloud_service_name, expand:expand, custom_headers:custom_headers).value!
97
+ end
98
+
99
+ #
100
+ # Gets a role instance from a cloud service.
101
+ #
102
+ # @param role_instance_name [String] Name of the role instance.
103
+ # @param resource_group_name [String]
104
+ # @param cloud_service_name [String]
105
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
106
+ # operation. Possible values include: 'instanceView'
107
+ # @param [Hash{String => String}] A hash of custom headers that will be added
108
+ # to the HTTP request.
109
+ #
110
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
111
+ #
112
+ def get_async(role_instance_name, resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
113
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
114
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
115
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
116
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
117
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
118
+
119
+
120
+ request_headers = {}
121
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
122
+
123
+ # Set Headers
124
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
125
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
126
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}'
127
+
128
+ request_url = @base_url || @client.base_url
129
+
130
+ options = {
131
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
132
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
133
+ query_params: {'api-version' => @client.api_version,'$expand' => expand},
134
+ headers: request_headers.merge(custom_headers || {}),
135
+ base_url: request_url
136
+ }
137
+ promise = @client.make_request_async(:get, path_template, options)
138
+
139
+ promise = promise.then do |result|
140
+ http_response = result.response
141
+ status_code = http_response.status
142
+ response_content = http_response.body
143
+ unless status_code == 200
144
+ error_model = JSON.load(response_content)
145
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
146
+ end
147
+
148
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
149
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
150
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
151
+ # Deserialize Response
152
+ if status_code == 200
153
+ begin
154
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
155
+ result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstance.mapper()
156
+ result.body = @client.deserialize(result_mapper, parsed_response)
157
+ rescue Exception => e
158
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
159
+ end
160
+ end
161
+
162
+ result
163
+ end
164
+
165
+ promise.execute
166
+ end
167
+
168
+ #
169
+ # Retrieves information about the run-time state of a role instance in a cloud
170
+ # service.
171
+ #
172
+ # @param role_instance_name [String] Name of the role instance.
173
+ # @param resource_group_name [String]
174
+ # @param cloud_service_name [String]
175
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
176
+ # will be added to the HTTP request.
177
+ #
178
+ # @return [RoleInstanceInstanceView] operation results.
179
+ #
180
+ def get_instance_view(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
181
+ response = get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
182
+ response.body unless response.nil?
183
+ end
184
+
185
+ #
186
+ # Retrieves information about the run-time state of a role instance in a cloud
187
+ # service.
188
+ #
189
+ # @param role_instance_name [String] Name of the role instance.
190
+ # @param resource_group_name [String]
191
+ # @param cloud_service_name [String]
192
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
193
+ # will be added to the HTTP request.
194
+ #
195
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
196
+ #
197
+ def get_instance_view_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
198
+ get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
199
+ end
200
+
201
+ #
202
+ # Retrieves information about the run-time state of a role instance in a cloud
203
+ # service.
204
+ #
205
+ # @param role_instance_name [String] Name of the role instance.
206
+ # @param resource_group_name [String]
207
+ # @param cloud_service_name [String]
208
+ # @param [Hash{String => String}] A hash of custom headers that will be added
209
+ # to the HTTP request.
210
+ #
211
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
212
+ #
213
+ def get_instance_view_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
214
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
215
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
216
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
217
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
218
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
219
+
220
+
221
+ request_headers = {}
222
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
223
+
224
+ # Set Headers
225
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
226
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
227
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView'
228
+
229
+ request_url = @base_url || @client.base_url
230
+
231
+ options = {
232
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
233
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
234
+ query_params: {'api-version' => @client.api_version},
235
+ headers: request_headers.merge(custom_headers || {}),
236
+ base_url: request_url
237
+ }
238
+ promise = @client.make_request_async(:get, path_template, options)
239
+
240
+ promise = promise.then do |result|
241
+ http_response = result.response
242
+ status_code = http_response.status
243
+ response_content = http_response.body
244
+ unless status_code == 200
245
+ error_model = JSON.load(response_content)
246
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
247
+ end
248
+
249
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
250
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
251
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
252
+ # Deserialize Response
253
+ if status_code == 200
254
+ begin
255
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
256
+ result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstanceInstanceView.mapper()
257
+ result.body = @client.deserialize(result_mapper, parsed_response)
258
+ rescue Exception => e
259
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
260
+ end
261
+ end
262
+
263
+ result
264
+ end
265
+
266
+ promise.execute
267
+ end
268
+
269
+ #
270
+ # Gets the list of all role instances in a cloud service. Use nextLink property
271
+ # in the response to get the next page of role instances. Do this till nextLink
272
+ # is null to fetch all the role instances.
273
+ #
274
+ # @param resource_group_name [String]
275
+ # @param cloud_service_name [String]
276
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
277
+ # operation. Possible values include: 'instanceView'
278
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
279
+ # will be added to the HTTP request.
280
+ #
281
+ # @return [Array<RoleInstance>] operation results.
282
+ #
283
+ def list(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
284
+ first_page = list_as_lazy(resource_group_name, cloud_service_name, expand:expand, custom_headers:custom_headers)
285
+ first_page.get_all_items
286
+ end
287
+
288
+ #
289
+ # Gets the list of all role instances in a cloud service. Use nextLink property
290
+ # in the response to get the next page of role instances. Do this till nextLink
291
+ # is null to fetch all the role instances.
292
+ #
293
+ # @param resource_group_name [String]
294
+ # @param cloud_service_name [String]
295
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
296
+ # operation. Possible values include: 'instanceView'
297
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
298
+ # will be added to the HTTP request.
299
+ #
300
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
301
+ #
302
+ def list_with_http_info(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
303
+ list_async(resource_group_name, cloud_service_name, expand:expand, custom_headers:custom_headers).value!
304
+ end
305
+
306
+ #
307
+ # Gets the list of all role instances in a cloud service. Use nextLink property
308
+ # in the response to get the next page of role instances. Do this till nextLink
309
+ # is null to fetch all the role instances.
310
+ #
311
+ # @param resource_group_name [String]
312
+ # @param cloud_service_name [String]
313
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
314
+ # operation. Possible values include: 'instanceView'
315
+ # @param [Hash{String => String}] A hash of custom headers that will be added
316
+ # to the HTTP request.
317
+ #
318
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
319
+ #
320
+ def list_async(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
321
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
322
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
323
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
324
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
325
+
326
+
327
+ request_headers = {}
328
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
329
+
330
+ # Set Headers
331
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
332
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
333
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances'
334
+
335
+ request_url = @base_url || @client.base_url
336
+
337
+ options = {
338
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
339
+ path_params: {'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
340
+ query_params: {'api-version' => @client.api_version,'$expand' => expand},
341
+ headers: request_headers.merge(custom_headers || {}),
342
+ base_url: request_url
343
+ }
344
+ promise = @client.make_request_async(:get, path_template, options)
345
+
346
+ promise = promise.then do |result|
347
+ http_response = result.response
348
+ status_code = http_response.status
349
+ response_content = http_response.body
350
+ unless status_code == 200
351
+ error_model = JSON.load(response_content)
352
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
353
+ end
354
+
355
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
356
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
357
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
358
+ # Deserialize Response
359
+ if status_code == 200
360
+ begin
361
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
362
+ result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstanceListResult.mapper()
363
+ result.body = @client.deserialize(result_mapper, parsed_response)
364
+ rescue Exception => e
365
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
366
+ end
367
+ end
368
+
369
+ result
370
+ end
371
+
372
+ promise.execute
373
+ end
374
+
375
+ #
376
+ # The Reboot Role Instance asynchronous operation requests a reboot of a role
377
+ # instance in the cloud service.
378
+ #
379
+ # @param role_instance_name [String] Name of the role instance.
380
+ # @param resource_group_name [String]
381
+ # @param cloud_service_name [String]
382
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
383
+ # will be added to the HTTP request.
384
+ #
385
+ def restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
386
+ response = restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
387
+ nil
388
+ end
389
+
390
+ #
391
+ # @param role_instance_name [String] Name of the role instance.
392
+ # @param resource_group_name [String]
393
+ # @param cloud_service_name [String]
394
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
395
+ # will be added to the HTTP request.
396
+ #
397
+ # @return [Concurrent::Promise] promise which provides async access to http
398
+ # response.
399
+ #
400
+ def restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
401
+ # Send request
402
+ promise = begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers)
403
+
404
+ promise = promise.then do |response|
405
+ # Defining deserialization method.
406
+ deserialize_method = lambda do |parsed_response|
407
+ end
408
+
409
+ # Waiting for response.
410
+ @client.get_long_running_operation_result(response, deserialize_method)
411
+ end
412
+
413
+ promise
414
+ end
415
+
416
+ #
417
+ # The Reimage Role Instance asynchronous operation reinstalls the operating
418
+ # system on instances of web roles or worker roles.
419
+ #
420
+ # @param role_instance_name [String] Name of the role instance.
421
+ # @param resource_group_name [String]
422
+ # @param cloud_service_name [String]
423
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
424
+ # will be added to the HTTP request.
425
+ #
426
+ def reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
427
+ response = reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
428
+ nil
429
+ end
430
+
431
+ #
432
+ # @param role_instance_name [String] Name of the role instance.
433
+ # @param resource_group_name [String]
434
+ # @param cloud_service_name [String]
435
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
436
+ # will be added to the HTTP request.
437
+ #
438
+ # @return [Concurrent::Promise] promise which provides async access to http
439
+ # response.
440
+ #
441
+ def reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
442
+ # Send request
443
+ promise = begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers)
444
+
445
+ promise = promise.then do |response|
446
+ # Defining deserialization method.
447
+ deserialize_method = lambda do |parsed_response|
448
+ end
449
+
450
+ # Waiting for response.
451
+ @client.get_long_running_operation_result(response, deserialize_method)
452
+ end
453
+
454
+ promise
455
+ end
456
+
457
+ #
458
+ # The Rebuild Role Instance asynchronous operation reinstalls the operating
459
+ # system on instances of web roles or worker roles and initializes the storage
460
+ # resources that are used by them. If you do not want to initialize storage
461
+ # resources, you can use Reimage Role Instance.
462
+ #
463
+ # @param role_instance_name [String] Name of the role instance.
464
+ # @param resource_group_name [String]
465
+ # @param cloud_service_name [String]
466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
467
+ # will be added to the HTTP request.
468
+ #
469
+ def rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
470
+ response = rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
471
+ nil
472
+ end
473
+
474
+ #
475
+ # @param role_instance_name [String] Name of the role instance.
476
+ # @param resource_group_name [String]
477
+ # @param cloud_service_name [String]
478
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
479
+ # will be added to the HTTP request.
480
+ #
481
+ # @return [Concurrent::Promise] promise which provides async access to http
482
+ # response.
483
+ #
484
+ def rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
485
+ # Send request
486
+ promise = begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers)
487
+
488
+ promise = promise.then do |response|
489
+ # Defining deserialization method.
490
+ deserialize_method = lambda do |parsed_response|
491
+ end
492
+
493
+ # Waiting for response.
494
+ @client.get_long_running_operation_result(response, deserialize_method)
495
+ end
496
+
497
+ promise
498
+ end
499
+
500
+ #
501
+ # Gets a remote desktop file for a role instance in a cloud service.
502
+ #
503
+ # @param role_instance_name [String] Name of the role instance.
504
+ # @param resource_group_name [String]
505
+ # @param cloud_service_name [String]
506
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
507
+ # will be added to the HTTP request.
508
+ #
509
+ # @return [NOT_IMPLEMENTED] operation results.
510
+ #
511
+ def get_remote_desktop_file(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
512
+ response = get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
513
+ response.body unless response.nil?
514
+ end
515
+
516
+ #
517
+ # Gets a remote desktop file for a role instance in a cloud service.
518
+ #
519
+ # @param role_instance_name [String] Name of the role instance.
520
+ # @param resource_group_name [String]
521
+ # @param cloud_service_name [String]
522
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
523
+ # will be added to the HTTP request.
524
+ #
525
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
526
+ #
527
+ def get_remote_desktop_file_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
528
+ get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
529
+ end
530
+
531
+ #
532
+ # Gets a remote desktop file for a role instance in a cloud service.
533
+ #
534
+ # @param role_instance_name [String] Name of the role instance.
535
+ # @param resource_group_name [String]
536
+ # @param cloud_service_name [String]
537
+ # @param [Hash{String => String}] A hash of custom headers that will be added
538
+ # to the HTTP request.
539
+ #
540
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
541
+ #
542
+ def get_remote_desktop_file_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
543
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
544
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
545
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
546
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
547
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
548
+
549
+
550
+ request_headers = {}
551
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
552
+
553
+ # Set Headers
554
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
555
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
556
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile'
557
+
558
+ request_url = @base_url || @client.base_url
559
+
560
+ options = {
561
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
562
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
563
+ query_params: {'api-version' => @client.api_version},
564
+ headers: request_headers.merge(custom_headers || {}),
565
+ base_url: request_url
566
+ }
567
+ promise = @client.make_request_async(:get, path_template, options)
568
+
569
+ promise = promise.then do |result|
570
+ http_response = result.response
571
+ status_code = http_response.status
572
+ response_content = http_response.body
573
+ unless status_code == 200
574
+ error_model = JSON.load(response_content)
575
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
576
+ end
577
+
578
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
579
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
580
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
581
+ # Deserialize Response
582
+ if status_code == 200
583
+ begin
584
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
585
+ result_mapper = {
586
+ client_side_validation: true,
587
+ required: false,
588
+ serialized_name: 'parsed_response',
589
+ type: {
590
+ name: 'Stream'
591
+ }
592
+ }
593
+ result.body = @client.deserialize(result_mapper, parsed_response)
594
+ rescue Exception => e
595
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
596
+ end
597
+ end
598
+
599
+ result
600
+ end
601
+
602
+ promise.execute
603
+ end
604
+
605
+ #
606
+ # Deletes a role instance from a cloud service.
607
+ #
608
+ # @param role_instance_name [String] Name of the role instance.
609
+ # @param resource_group_name [String]
610
+ # @param cloud_service_name [String]
611
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
612
+ # will be added to the HTTP request.
613
+ #
614
+ #
615
+ def begin_delete(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
616
+ response = begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
617
+ nil
618
+ end
619
+
620
+ #
621
+ # Deletes a role instance from a cloud service.
622
+ #
623
+ # @param role_instance_name [String] Name of the role instance.
624
+ # @param resource_group_name [String]
625
+ # @param cloud_service_name [String]
626
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
627
+ # will be added to the HTTP request.
628
+ #
629
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
630
+ #
631
+ def begin_delete_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
632
+ begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
633
+ end
634
+
635
+ #
636
+ # Deletes a role instance from a cloud service.
637
+ #
638
+ # @param role_instance_name [String] Name of the role instance.
639
+ # @param resource_group_name [String]
640
+ # @param cloud_service_name [String]
641
+ # @param [Hash{String => String}] A hash of custom headers that will be added
642
+ # to the HTTP request.
643
+ #
644
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
645
+ #
646
+ def begin_delete_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
647
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
648
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
649
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
650
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
651
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
652
+
653
+
654
+ request_headers = {}
655
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
656
+
657
+ # Set Headers
658
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
659
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
660
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}'
661
+
662
+ request_url = @base_url || @client.base_url
663
+
664
+ options = {
665
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
666
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
667
+ query_params: {'api-version' => @client.api_version},
668
+ headers: request_headers.merge(custom_headers || {}),
669
+ base_url: request_url
670
+ }
671
+ promise = @client.make_request_async(:delete, path_template, options)
672
+
673
+ promise = promise.then do |result|
674
+ http_response = result.response
675
+ status_code = http_response.status
676
+ response_content = http_response.body
677
+ unless status_code == 200 || status_code == 202 || status_code == 204
678
+ error_model = JSON.load(response_content)
679
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
680
+ end
681
+
682
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
683
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
684
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
685
+
686
+ result
687
+ end
688
+
689
+ promise.execute
690
+ end
691
+
692
+ #
693
+ # The Reboot Role Instance asynchronous operation requests a reboot of a role
694
+ # instance in the cloud service.
695
+ #
696
+ # @param role_instance_name [String] Name of the role instance.
697
+ # @param resource_group_name [String]
698
+ # @param cloud_service_name [String]
699
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
700
+ # will be added to the HTTP request.
701
+ #
702
+ #
703
+ def begin_restart(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
704
+ response = begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
705
+ nil
706
+ end
707
+
708
+ #
709
+ # The Reboot Role Instance asynchronous operation requests a reboot of a role
710
+ # instance in the cloud service.
711
+ #
712
+ # @param role_instance_name [String] Name of the role instance.
713
+ # @param resource_group_name [String]
714
+ # @param cloud_service_name [String]
715
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
716
+ # will be added to the HTTP request.
717
+ #
718
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
719
+ #
720
+ def begin_restart_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
721
+ begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
722
+ end
723
+
724
+ #
725
+ # The Reboot Role Instance asynchronous operation requests a reboot of a role
726
+ # instance in the cloud service.
727
+ #
728
+ # @param role_instance_name [String] Name of the role instance.
729
+ # @param resource_group_name [String]
730
+ # @param cloud_service_name [String]
731
+ # @param [Hash{String => String}] A hash of custom headers that will be added
732
+ # to the HTTP request.
733
+ #
734
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
735
+ #
736
+ def begin_restart_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
737
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
738
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
739
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
740
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
741
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
742
+
743
+
744
+ request_headers = {}
745
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
746
+
747
+ # Set Headers
748
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
749
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
750
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart'
751
+
752
+ request_url = @base_url || @client.base_url
753
+
754
+ options = {
755
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
756
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
757
+ query_params: {'api-version' => @client.api_version},
758
+ headers: request_headers.merge(custom_headers || {}),
759
+ base_url: request_url
760
+ }
761
+ promise = @client.make_request_async(:post, path_template, options)
762
+
763
+ promise = promise.then do |result|
764
+ http_response = result.response
765
+ status_code = http_response.status
766
+ response_content = http_response.body
767
+ unless status_code == 200 || status_code == 202
768
+ error_model = JSON.load(response_content)
769
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
770
+ end
771
+
772
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
773
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
774
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
775
+
776
+ result
777
+ end
778
+
779
+ promise.execute
780
+ end
781
+
782
+ #
783
+ # The Reimage Role Instance asynchronous operation reinstalls the operating
784
+ # system on instances of web roles or worker roles.
785
+ #
786
+ # @param role_instance_name [String] Name of the role instance.
787
+ # @param resource_group_name [String]
788
+ # @param cloud_service_name [String]
789
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
790
+ # will be added to the HTTP request.
791
+ #
792
+ #
793
+ def begin_reimage(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
794
+ response = begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
795
+ nil
796
+ end
797
+
798
+ #
799
+ # The Reimage Role Instance asynchronous operation reinstalls the operating
800
+ # system on instances of web roles or worker roles.
801
+ #
802
+ # @param role_instance_name [String] Name of the role instance.
803
+ # @param resource_group_name [String]
804
+ # @param cloud_service_name [String]
805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
806
+ # will be added to the HTTP request.
807
+ #
808
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
809
+ #
810
+ def begin_reimage_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
811
+ begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
812
+ end
813
+
814
+ #
815
+ # The Reimage Role Instance asynchronous operation reinstalls the operating
816
+ # system on instances of web roles or worker roles.
817
+ #
818
+ # @param role_instance_name [String] Name of the role instance.
819
+ # @param resource_group_name [String]
820
+ # @param cloud_service_name [String]
821
+ # @param [Hash{String => String}] A hash of custom headers that will be added
822
+ # to the HTTP request.
823
+ #
824
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
825
+ #
826
+ def begin_reimage_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
827
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
828
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
829
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
830
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
831
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
832
+
833
+
834
+ request_headers = {}
835
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
836
+
837
+ # Set Headers
838
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
839
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
840
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage'
841
+
842
+ request_url = @base_url || @client.base_url
843
+
844
+ options = {
845
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
846
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
847
+ query_params: {'api-version' => @client.api_version},
848
+ headers: request_headers.merge(custom_headers || {}),
849
+ base_url: request_url
850
+ }
851
+ promise = @client.make_request_async(:post, path_template, options)
852
+
853
+ promise = promise.then do |result|
854
+ http_response = result.response
855
+ status_code = http_response.status
856
+ response_content = http_response.body
857
+ unless status_code == 200 || status_code == 202
858
+ error_model = JSON.load(response_content)
859
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
860
+ end
861
+
862
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
863
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
864
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
865
+
866
+ result
867
+ end
868
+
869
+ promise.execute
870
+ end
871
+
872
+ #
873
+ # The Rebuild Role Instance asynchronous operation reinstalls the operating
874
+ # system on instances of web roles or worker roles and initializes the storage
875
+ # resources that are used by them. If you do not want to initialize storage
876
+ # resources, you can use Reimage Role Instance.
877
+ #
878
+ # @param role_instance_name [String] Name of the role instance.
879
+ # @param resource_group_name [String]
880
+ # @param cloud_service_name [String]
881
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
882
+ # will be added to the HTTP request.
883
+ #
884
+ #
885
+ def begin_rebuild(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
886
+ response = begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
887
+ nil
888
+ end
889
+
890
+ #
891
+ # The Rebuild Role Instance asynchronous operation reinstalls the operating
892
+ # system on instances of web roles or worker roles and initializes the storage
893
+ # resources that are used by them. If you do not want to initialize storage
894
+ # resources, you can use Reimage Role Instance.
895
+ #
896
+ # @param role_instance_name [String] Name of the role instance.
897
+ # @param resource_group_name [String]
898
+ # @param cloud_service_name [String]
899
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
900
+ # will be added to the HTTP request.
901
+ #
902
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
903
+ #
904
+ def begin_rebuild_with_http_info(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
905
+ begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:custom_headers).value!
906
+ end
907
+
908
+ #
909
+ # The Rebuild Role Instance asynchronous operation reinstalls the operating
910
+ # system on instances of web roles or worker roles and initializes the storage
911
+ # resources that are used by them. If you do not want to initialize storage
912
+ # resources, you can use Reimage Role Instance.
913
+ #
914
+ # @param role_instance_name [String] Name of the role instance.
915
+ # @param resource_group_name [String]
916
+ # @param cloud_service_name [String]
917
+ # @param [Hash{String => String}] A hash of custom headers that will be added
918
+ # to the HTTP request.
919
+ #
920
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
921
+ #
922
+ def begin_rebuild_async(role_instance_name, resource_group_name, cloud_service_name, custom_headers:nil)
923
+ fail ArgumentError, 'role_instance_name is nil' if role_instance_name.nil?
924
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
925
+ fail ArgumentError, 'cloud_service_name is nil' if cloud_service_name.nil?
926
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
927
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
928
+
929
+
930
+ request_headers = {}
931
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
932
+
933
+ # Set Headers
934
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
935
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
936
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild'
937
+
938
+ request_url = @base_url || @client.base_url
939
+
940
+ options = {
941
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
942
+ path_params: {'roleInstanceName' => role_instance_name,'resourceGroupName' => resource_group_name,'cloudServiceName' => cloud_service_name,'subscriptionId' => @client.subscription_id},
943
+ query_params: {'api-version' => @client.api_version},
944
+ headers: request_headers.merge(custom_headers || {}),
945
+ base_url: request_url
946
+ }
947
+ promise = @client.make_request_async(:post, path_template, options)
948
+
949
+ promise = promise.then do |result|
950
+ http_response = result.response
951
+ status_code = http_response.status
952
+ response_content = http_response.body
953
+ unless status_code == 200 || status_code == 202
954
+ error_model = JSON.load(response_content)
955
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
956
+ end
957
+
958
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
959
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
960
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
961
+
962
+ result
963
+ end
964
+
965
+ promise.execute
966
+ end
967
+
968
+ #
969
+ # Gets the list of all role instances in a cloud service. Use nextLink property
970
+ # in the response to get the next page of role instances. Do this till nextLink
971
+ # is null to fetch all the role instances.
972
+ #
973
+ # @param next_page_link [String] The NextLink from the previous successful call
974
+ # to List operation.
975
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
976
+ # will be added to the HTTP request.
977
+ #
978
+ # @return [RoleInstanceListResult] operation results.
979
+ #
980
+ def list_next(next_page_link, custom_headers:nil)
981
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
982
+ response.body unless response.nil?
983
+ end
984
+
985
+ #
986
+ # Gets the list of all role instances in a cloud service. Use nextLink property
987
+ # in the response to get the next page of role instances. Do this till nextLink
988
+ # is null to fetch all the role instances.
989
+ #
990
+ # @param next_page_link [String] The NextLink from the previous successful call
991
+ # to List operation.
992
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
993
+ # will be added to the HTTP request.
994
+ #
995
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
996
+ #
997
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
998
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
999
+ end
1000
+
1001
+ #
1002
+ # Gets the list of all role instances in a cloud service. Use nextLink property
1003
+ # in the response to get the next page of role instances. Do this till nextLink
1004
+ # is null to fetch all the role instances.
1005
+ #
1006
+ # @param next_page_link [String] The NextLink from the previous successful call
1007
+ # to List operation.
1008
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1009
+ # to the HTTP request.
1010
+ #
1011
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1012
+ #
1013
+ def list_next_async(next_page_link, custom_headers:nil)
1014
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1015
+
1016
+
1017
+ request_headers = {}
1018
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1019
+
1020
+ # Set Headers
1021
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1022
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1023
+ path_template = '{nextLink}'
1024
+
1025
+ request_url = @base_url || @client.base_url
1026
+
1027
+ options = {
1028
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1029
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1030
+ headers: request_headers.merge(custom_headers || {}),
1031
+ base_url: request_url
1032
+ }
1033
+ promise = @client.make_request_async(:get, path_template, options)
1034
+
1035
+ promise = promise.then do |result|
1036
+ http_response = result.response
1037
+ status_code = http_response.status
1038
+ response_content = http_response.body
1039
+ unless status_code == 200
1040
+ error_model = JSON.load(response_content)
1041
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1042
+ end
1043
+
1044
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1045
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1046
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1047
+ # Deserialize Response
1048
+ if status_code == 200
1049
+ begin
1050
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1051
+ result_mapper = Azure::Compute::Mgmt::V2020_10_01_preview::Models::RoleInstanceListResult.mapper()
1052
+ result.body = @client.deserialize(result_mapper, parsed_response)
1053
+ rescue Exception => e
1054
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1055
+ end
1056
+ end
1057
+
1058
+ result
1059
+ end
1060
+
1061
+ promise.execute
1062
+ end
1063
+
1064
+ #
1065
+ # Gets the list of all role instances in a cloud service. Use nextLink property
1066
+ # in the response to get the next page of role instances. Do this till nextLink
1067
+ # is null to fetch all the role instances.
1068
+ #
1069
+ # @param resource_group_name [String]
1070
+ # @param cloud_service_name [String]
1071
+ # @param expand [InstanceViewTypes] The expand expression to apply to the
1072
+ # operation. Possible values include: 'instanceView'
1073
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1074
+ # will be added to the HTTP request.
1075
+ #
1076
+ # @return [RoleInstanceListResult] which provide lazy access to pages of the
1077
+ # response.
1078
+ #
1079
+ def list_as_lazy(resource_group_name, cloud_service_name, expand:nil, custom_headers:nil)
1080
+ response = list_async(resource_group_name, cloud_service_name, expand:expand, custom_headers:custom_headers).value!
1081
+ unless response.nil?
1082
+ page = response.body
1083
+ page.next_method = Proc.new do |next_page_link|
1084
+ list_next_async(next_page_link, custom_headers:custom_headers)
1085
+ end
1086
+ page
1087
+ end
1088
+ end
1089
+
1090
+ end
1091
+ end