azure_mgmt_batchai 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai.rb +107 -0
  4. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/batch_aimanagement_client.rb +143 -0
  5. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/clusters.rb +1261 -0
  6. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/file_servers.rb +918 -0
  7. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/jobs.rb +1536 -0
  8. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/allocation_state.rb +16 -0
  9. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/auto_scale_settings.rb +75 -0
  10. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb +97 -0
  11. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb +109 -0
  12. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb +63 -0
  13. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/batch_aierror.rb +80 -0
  14. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/caching_type.rb +17 -0
  15. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/caffe2settings.rb +70 -0
  16. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/caffe_settings.rb +97 -0
  17. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/chainer_settings.rb +83 -0
  18. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster.rb +310 -0
  19. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb +161 -0
  20. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster_list_result.rb +98 -0
  21. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb +67 -0
  22. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/clusters_list_by_resource_group_options.rb +69 -0
  23. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/clusters_list_options.rb +69 -0
  24. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/cntksettings.rb +110 -0
  25. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/container_settings.rb +47 -0
  26. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb +46 -0
  27. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/data_disks.rb +88 -0
  28. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/deallocation_option.rb +18 -0
  29. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/environment_setting.rb +57 -0
  30. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/execution_state.rb +19 -0
  31. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file.rb +85 -0
  32. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_list_result.rb +99 -0
  33. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server.rb +197 -0
  34. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb +116 -0
  35. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_list_result.rb +98 -0
  36. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb +19 -0
  37. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_reference.rb +85 -0
  38. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_server_type.rb +16 -0
  39. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_servers_list_by_resource_group_options.rb +69 -0
  40. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/file_servers_list_options.rb +69 -0
  41. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/image_reference.rb +79 -0
  42. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/image_source_registry.rb +70 -0
  43. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/input_directory.rb +62 -0
  44. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job.rb +427 -0
  45. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb +48 -0
  46. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_create_parameters.rb +313 -0
  47. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_list_result.rb +98 -0
  48. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_preparation.rb +48 -0
  49. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_properties_constraints.rb +48 -0
  50. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb +96 -0
  51. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/jobs_list_by_resource_group_options.rb +69 -0
  52. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/jobs_list_options.rb +69 -0
  53. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb +71 -0
  54. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/key_vault_key_reference.rb +58 -0
  55. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb +58 -0
  56. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/local_data_volume.rb +59 -0
  57. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/manual_scale_settings.rb +65 -0
  58. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/mount_settings.rb +81 -0
  59. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/mount_volumes.rb +121 -0
  60. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/name_value_pair.rb +57 -0
  61. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/node_setup.rb +67 -0
  62. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/node_state_counts.rb +91 -0
  63. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/operation.rb +83 -0
  64. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/operation_display.rb +80 -0
  65. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/operation_list_result.rb +99 -0
  66. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/output_directory.rb +104 -0
  67. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/output_type.rb +18 -0
  68. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/private_registry_credentials.rb +73 -0
  69. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/provisioning_state.rb +18 -0
  70. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/remote_login_information.rb +68 -0
  71. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb +99 -0
  72. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/resource.rb +112 -0
  73. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/resource_id.rb +47 -0
  74. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/scale_settings.rb +64 -0
  75. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/setup_task.rb +92 -0
  76. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/ssh_configuration.rb +68 -0
  77. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/storage_account_type.rb +16 -0
  78. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb +123 -0
  79. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/tool_type.rb +20 -0
  80. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb +59 -0
  81. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/user_account_settings.rb +71 -0
  82. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb +47 -0
  83. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/models/vm_priority.rb +16 -0
  84. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/module_definition.rb +9 -0
  85. data/lib/2017-09-01-preview/generated/azure_mgmt_batchai/operations.rb +219 -0
  86. data/lib/2018-03-01/generated/azure_mgmt_batchai.rb +115 -0
  87. data/lib/2018-03-01/generated/azure_mgmt_batchai/batch_aimanagement_client.rb +147 -0
  88. data/lib/2018-03-01/generated/azure_mgmt_batchai/clusters.rb +1261 -0
  89. data/lib/2018-03-01/generated/azure_mgmt_batchai/file_servers.rb +918 -0
  90. data/lib/2018-03-01/generated/azure_mgmt_batchai/jobs.rb +1547 -0
  91. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/allocation_state.rb +16 -0
  92. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/app_insights_reference.rb +77 -0
  93. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/auto_scale_settings.rb +75 -0
  94. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb +99 -0
  95. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb +110 -0
  96. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb +63 -0
  97. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/batch_aierror.rb +80 -0
  98. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/caching_type.rb +17 -0
  99. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/caffe2settings.rb +70 -0
  100. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/caffe_settings.rb +97 -0
  101. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/chainer_settings.rb +83 -0
  102. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster.rb +310 -0
  103. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb +161 -0
  104. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster_list_result.rb +98 -0
  105. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb +67 -0
  106. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/clusters_list_by_resource_group_options.rb +69 -0
  107. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/clusters_list_options.rb +69 -0
  108. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/cntksettings.rb +110 -0
  109. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/container_settings.rb +47 -0
  110. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb +46 -0
  111. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/data_disks.rb +87 -0
  112. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/deallocation_option.rb +18 -0
  113. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/environment_variable.rb +57 -0
  114. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/environment_variable_with_secret_value.rb +75 -0
  115. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/execution_state.rb +19 -0
  116. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file.rb +92 -0
  117. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_list_result.rb +100 -0
  118. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server.rb +197 -0
  119. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb +116 -0
  120. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_list_result.rb +98 -0
  121. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb +19 -0
  122. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_reference.rb +86 -0
  123. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_server_type.rb +16 -0
  124. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_servers_list_by_resource_group_options.rb +69 -0
  125. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/file_servers_list_options.rb +69 -0
  126. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/image_reference.rb +99 -0
  127. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/image_source_registry.rb +70 -0
  128. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/input_directory.rb +59 -0
  129. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job.rb +490 -0
  130. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb +48 -0
  131. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_create_parameters.rb +360 -0
  132. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_list_result.rb +98 -0
  133. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_preparation.rb +48 -0
  134. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_properties_constraints.rb +48 -0
  135. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb +96 -0
  136. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/jobs_list_by_resource_group_options.rb +69 -0
  137. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/jobs_list_options.rb +69 -0
  138. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb +82 -0
  139. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/key_vault_key_reference.rb +58 -0
  140. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb +58 -0
  141. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/list_usages_result.rb +100 -0
  142. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/local_data_volume.rb +59 -0
  143. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/manual_scale_settings.rb +65 -0
  144. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/mount_settings.rb +81 -0
  145. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/mount_volumes.rb +121 -0
  146. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/name_value_pair.rb +57 -0
  147. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/node_setup.rb +82 -0
  148. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/node_state_counts.rb +91 -0
  149. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/operation.rb +83 -0
  150. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/operation_display.rb +80 -0
  151. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/operation_list_result.rb +99 -0
  152. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/output_directory.rb +110 -0
  153. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/output_type.rb +18 -0
  154. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/performance_counters_settings.rb +50 -0
  155. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/private_registry_credentials.rb +73 -0
  156. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/provisioning_state.rb +18 -0
  157. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/py_torch_settings.rb +95 -0
  158. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/remote_login_information.rb +68 -0
  159. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb +99 -0
  160. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/resource.rb +112 -0
  161. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/resource_id.rb +47 -0
  162. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/scale_settings.rb +64 -0
  163. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/setup_task.rb +134 -0
  164. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/ssh_configuration.rb +69 -0
  165. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/storage_account_type.rb +16 -0
  166. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb +123 -0
  167. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/tool_type.rb +20 -0
  168. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb +61 -0
  169. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/usage.rb +83 -0
  170. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/usage_name.rb +57 -0
  171. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/user_account_settings.rb +71 -0
  172. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb +47 -0
  173. data/lib/2018-03-01/generated/azure_mgmt_batchai/models/vm_priority.rb +16 -0
  174. data/lib/2018-03-01/generated/azure_mgmt_batchai/module_definition.rb +9 -0
  175. data/lib/2018-03-01/generated/azure_mgmt_batchai/operations.rb +219 -0
  176. data/lib/2018-03-01/generated/azure_mgmt_batchai/usage_operations.rb +234 -0
  177. data/lib/2018-05-01/generated/azure_mgmt_batchai.rb +125 -0
  178. data/lib/2018-05-01/generated/azure_mgmt_batchai/batch_aimanagement_client.rb +155 -0
  179. data/lib/2018-05-01/generated/azure_mgmt_batchai/clusters.rb +1122 -0
  180. data/lib/2018-05-01/generated/azure_mgmt_batchai/experiments.rb +712 -0
  181. data/lib/2018-05-01/generated/azure_mgmt_batchai/file_servers.rb +743 -0
  182. data/lib/2018-05-01/generated/azure_mgmt_batchai/jobs.rb +1560 -0
  183. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/allocation_state.rb +16 -0
  184. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/app_insights_reference.rb +76 -0
  185. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/auto_scale_settings.rb +77 -0
  186. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb +98 -0
  187. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb +111 -0
  188. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb +61 -0
  189. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/batch_aierror.rb +83 -0
  190. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/caching_type.rb +17 -0
  191. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/caffe2settings.rb +70 -0
  192. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/caffe_settings.rb +97 -0
  193. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/chainer_settings.rb +83 -0
  194. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster.rb +279 -0
  195. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb +134 -0
  196. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster_list_result.rb +100 -0
  197. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb +48 -0
  198. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/clusters_list_by_workspace_options.rb +47 -0
  199. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/cntksettings.rb +111 -0
  200. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/container_settings.rb +60 -0
  201. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/custom_mpi_settings.rb +60 -0
  202. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb +47 -0
  203. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/data_disks.rb +92 -0
  204. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/deallocation_option.rb +17 -0
  205. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/environment_variable.rb +57 -0
  206. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/environment_variable_with_secret_value.rb +73 -0
  207. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/execution_state.rb +19 -0
  208. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/experiment.rb +101 -0
  209. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/experiment_list_result.rb +100 -0
  210. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/experiments_list_by_workspace_options.rb +47 -0
  211. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file.rb +98 -0
  212. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_list_result.rb +101 -0
  213. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server.rb +171 -0
  214. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb +88 -0
  215. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_list_result.rb +99 -0
  216. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb +19 -0
  217. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_server_reference.rb +88 -0
  218. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_servers_list_by_workspace_options.rb +47 -0
  219. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/file_type.rb +16 -0
  220. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/horovod_settings.rb +83 -0
  221. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/image_reference.rb +99 -0
  222. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/image_source_registry.rb +70 -0
  223. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/input_directory.rb +59 -0
  224. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job.rb +490 -0
  225. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb +48 -0
  226. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_create_parameters.rb +340 -0
  227. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_list_result.rb +100 -0
  228. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_preparation.rb +49 -0
  229. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_priority.rb +17 -0
  230. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_properties_constraints.rb +48 -0
  231. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb +99 -0
  232. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/jobs_list_by_experiment_options.rb +47 -0
  233. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb +82 -0
  234. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb +60 -0
  235. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/list_usages_result.rb +102 -0
  236. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/manual_scale_settings.rb +63 -0
  237. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/mount_settings.rb +71 -0
  238. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/mount_volumes.rb +122 -0
  239. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/name_value_pair.rb +57 -0
  240. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/node_setup.rb +79 -0
  241. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/node_state_counts.rb +100 -0
  242. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/operation.rb +85 -0
  243. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/operation_display.rb +84 -0
  244. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/operation_list_result.rb +101 -0
  245. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/output_directory.rb +77 -0
  246. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/performance_counters_settings.rb +50 -0
  247. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/private_registry_credentials.rb +74 -0
  248. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/provisioning_state.rb +18 -0
  249. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/proxy_resource.rb +71 -0
  250. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/py_torch_settings.rb +96 -0
  251. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/remote_login_information.rb +71 -0
  252. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb +101 -0
  253. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/resource.rb +112 -0
  254. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/resource_id.rb +47 -0
  255. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/scale_settings.rb +64 -0
  256. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/setup_task.rb +124 -0
  257. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/ssh_configuration.rb +70 -0
  258. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/storage_account_type.rb +16 -0
  259. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb +126 -0
  260. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/tool_type.rb +22 -0
  261. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb +62 -0
  262. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/usage.rb +85 -0
  263. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/usage_name.rb +59 -0
  264. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/usage_unit.rb +15 -0
  265. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/user_account_settings.rb +71 -0
  266. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb +48 -0
  267. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/vm_priority.rb +16 -0
  268. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace.rb +127 -0
  269. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace_create_parameters.rb +66 -0
  270. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace_list_result.rb +100 -0
  271. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspace_update_parameters.rb +55 -0
  272. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspaces_list_by_resource_group_options.rb +47 -0
  273. data/lib/2018-05-01/generated/azure_mgmt_batchai/models/workspaces_list_options.rb +47 -0
  274. data/lib/2018-05-01/generated/azure_mgmt_batchai/module_definition.rb +9 -0
  275. data/lib/2018-05-01/generated/azure_mgmt_batchai/operations.rb +219 -0
  276. data/lib/2018-05-01/generated/azure_mgmt_batchai/usages.rb +234 -0
  277. data/lib/2018-05-01/generated/azure_mgmt_batchai/workspaces.rb +991 -0
  278. data/lib/azure_mgmt_batchai.rb +8 -0
  279. data/lib/module_definition.rb +7 -0
  280. data/lib/profiles/latest/batchai_latest_profile_client.rb +40 -0
  281. data/lib/profiles/latest/batchai_module_definition.rb +8 -0
  282. data/lib/profiles/latest/modules/batchai_profile_module.rb +437 -0
  283. data/lib/version.rb +7 -0
  284. metadata +399 -0
@@ -0,0 +1,1261 @@
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::BatchAI::Mgmt::V2018_03_01
7
+ #
8
+ # The Azure BatchAI Management API.
9
+ #
10
+ class Clusters
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Clusters class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [BatchAIManagementClient] reference to the BatchAIManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can
26
+ # be run on the same cluster.
27
+ #
28
+ # @param resource_group_name [String] Name of the resource group to which the
29
+ # resource belongs.
30
+ # @param cluster_name [String] The name of the cluster within the specified
31
+ # resource group. Cluster names can only contain a combination of alphanumeric
32
+ # characters along with dash (-) and underscore (_). The name must be from 1
33
+ # through 64 characters long.
34
+ # @param parameters [ClusterCreateParameters] The parameters to provide for
35
+ # cluster creation.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [Cluster] operation results.
40
+ #
41
+ def create(resource_group_name, cluster_name, parameters, custom_headers:nil)
42
+ response = create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
43
+ response.body unless response.nil?
44
+ end
45
+
46
+ #
47
+ # @param resource_group_name [String] Name of the resource group to which the
48
+ # resource belongs.
49
+ # @param cluster_name [String] The name of the cluster within the specified
50
+ # resource group. Cluster names can only contain a combination of alphanumeric
51
+ # characters along with dash (-) and underscore (_). The name must be from 1
52
+ # through 64 characters long.
53
+ # @param parameters [ClusterCreateParameters] The parameters to provide for
54
+ # cluster creation.
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] promise which provides async access to http
59
+ # response.
60
+ #
61
+ def create_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
62
+ # Send request
63
+ promise = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers)
64
+
65
+ promise = promise.then do |response|
66
+ # Defining deserialization method.
67
+ deserialize_method = lambda do |parsed_response|
68
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::Cluster.mapper()
69
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
70
+ end
71
+
72
+ # Waiting for response.
73
+ @client.get_long_running_operation_result(response, deserialize_method)
74
+ end
75
+
76
+ promise
77
+ end
78
+
79
+ #
80
+ # Update the properties of a given cluster.
81
+ #
82
+ # @param resource_group_name [String] Name of the resource group to which the
83
+ # resource belongs.
84
+ # @param cluster_name [String] The name of the cluster within the specified
85
+ # resource group. Cluster names can only contain a combination of alphanumeric
86
+ # characters along with dash (-) and underscore (_). The name must be from 1
87
+ # through 64 characters long.
88
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
89
+ # update.
90
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
91
+ # will be added to the HTTP request.
92
+ #
93
+ # @return [Cluster] operation results.
94
+ #
95
+ def update(resource_group_name, cluster_name, parameters, custom_headers:nil)
96
+ response = update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
97
+ response.body unless response.nil?
98
+ end
99
+
100
+ #
101
+ # Update the properties of a given cluster.
102
+ #
103
+ # @param resource_group_name [String] Name of the resource group to which the
104
+ # resource belongs.
105
+ # @param cluster_name [String] The name of the cluster within the specified
106
+ # resource group. Cluster names can only contain a combination of alphanumeric
107
+ # characters along with dash (-) and underscore (_). The name must be from 1
108
+ # through 64 characters long.
109
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
110
+ # update.
111
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
112
+ # will be added to the HTTP request.
113
+ #
114
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
115
+ #
116
+ def update_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
117
+ update_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
118
+ end
119
+
120
+ #
121
+ # Update the properties of a given cluster.
122
+ #
123
+ # @param resource_group_name [String] Name of the resource group to which the
124
+ # resource belongs.
125
+ # @param cluster_name [String] The name of the cluster within the specified
126
+ # resource group. Cluster names can only contain a combination of alphanumeric
127
+ # characters along with dash (-) and underscore (_). The name must be from 1
128
+ # through 64 characters long.
129
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
130
+ # update.
131
+ # @param [Hash{String => String}] A hash of custom headers that will be added
132
+ # to the HTTP request.
133
+ #
134
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
135
+ #
136
+ def update_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
137
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
138
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
139
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
140
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
141
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
142
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
143
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
144
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
145
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
146
+
147
+
148
+ request_headers = {}
149
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
150
+
151
+ # Set Headers
152
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
153
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
154
+
155
+ # Serialize Request
156
+ request_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::ClusterUpdateParameters.mapper()
157
+ request_content = @client.serialize(request_mapper, parameters)
158
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
159
+
160
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}'
161
+
162
+ request_url = @base_url || @client.base_url
163
+
164
+ options = {
165
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
166
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
167
+ query_params: {'api-version' => @client.api_version},
168
+ body: request_content,
169
+ headers: request_headers.merge(custom_headers || {}),
170
+ base_url: request_url
171
+ }
172
+ promise = @client.make_request_async(:patch, path_template, options)
173
+
174
+ promise = promise.then do |result|
175
+ http_response = result.response
176
+ status_code = http_response.status
177
+ response_content = http_response.body
178
+ unless status_code == 200
179
+ error_model = JSON.load(response_content)
180
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
181
+ end
182
+
183
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
184
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
185
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
186
+ # Deserialize Response
187
+ if status_code == 200
188
+ begin
189
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
190
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::Cluster.mapper()
191
+ result.body = @client.deserialize(result_mapper, parsed_response)
192
+ rescue Exception => e
193
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
194
+ end
195
+ end
196
+
197
+ result
198
+ end
199
+
200
+ promise.execute
201
+ end
202
+
203
+ #
204
+ # Deletes a Cluster.
205
+ #
206
+ # @param resource_group_name [String] Name of the resource group to which the
207
+ # resource belongs.
208
+ # @param cluster_name [String] The name of the cluster within the specified
209
+ # resource group. Cluster names can only contain a combination of alphanumeric
210
+ # characters along with dash (-) and underscore (_). The name must be from 1
211
+ # through 64 characters long.
212
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
213
+ # will be added to the HTTP request.
214
+ #
215
+ def delete(resource_group_name, cluster_name, custom_headers:nil)
216
+ response = delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
217
+ nil
218
+ end
219
+
220
+ #
221
+ # @param resource_group_name [String] Name of the resource group to which the
222
+ # resource belongs.
223
+ # @param cluster_name [String] The name of the cluster within the specified
224
+ # resource group. Cluster names can only contain a combination of alphanumeric
225
+ # characters along with dash (-) and underscore (_). The name must be from 1
226
+ # through 64 characters long.
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [Concurrent::Promise] promise which provides async access to http
231
+ # response.
232
+ #
233
+ def delete_async(resource_group_name, cluster_name, custom_headers:nil)
234
+ # Send request
235
+ promise = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers)
236
+
237
+ promise = promise.then do |response|
238
+ # Defining deserialization method.
239
+ deserialize_method = lambda do |parsed_response|
240
+ end
241
+
242
+ # Waiting for response.
243
+ @client.get_long_running_operation_result(response, deserialize_method)
244
+ end
245
+
246
+ promise
247
+ end
248
+
249
+ #
250
+ # Gets information about the specified Cluster.
251
+ #
252
+ # @param resource_group_name [String] Name of the resource group to which the
253
+ # resource belongs.
254
+ # @param cluster_name [String] The name of the cluster within the specified
255
+ # resource group. Cluster names can only contain a combination of alphanumeric
256
+ # characters along with dash (-) and underscore (_). The name must be from 1
257
+ # through 64 characters long.
258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
259
+ # will be added to the HTTP request.
260
+ #
261
+ # @return [Cluster] operation results.
262
+ #
263
+ def get(resource_group_name, cluster_name, custom_headers:nil)
264
+ response = get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
265
+ response.body unless response.nil?
266
+ end
267
+
268
+ #
269
+ # Gets information about the specified Cluster.
270
+ #
271
+ # @param resource_group_name [String] Name of the resource group to which the
272
+ # resource belongs.
273
+ # @param cluster_name [String] The name of the cluster within the specified
274
+ # resource group. Cluster names can only contain a combination of alphanumeric
275
+ # characters along with dash (-) and underscore (_). The name must be from 1
276
+ # through 64 characters long.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
281
+ #
282
+ def get_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
283
+ get_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
284
+ end
285
+
286
+ #
287
+ # Gets information about the specified Cluster.
288
+ #
289
+ # @param resource_group_name [String] Name of the resource group to which the
290
+ # resource belongs.
291
+ # @param cluster_name [String] The name of the cluster within the specified
292
+ # resource group. Cluster names can only contain a combination of alphanumeric
293
+ # characters along with dash (-) and underscore (_). The name must be from 1
294
+ # through 64 characters long.
295
+ # @param [Hash{String => String}] A hash of custom headers that will be added
296
+ # to the HTTP request.
297
+ #
298
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
299
+ #
300
+ def get_async(resource_group_name, cluster_name, custom_headers:nil)
301
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
302
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
303
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
304
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
305
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
306
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
307
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
308
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
309
+
310
+
311
+ request_headers = {}
312
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
313
+
314
+ # Set Headers
315
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
316
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
317
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}'
318
+
319
+ request_url = @base_url || @client.base_url
320
+
321
+ options = {
322
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
323
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
324
+ query_params: {'api-version' => @client.api_version},
325
+ headers: request_headers.merge(custom_headers || {}),
326
+ base_url: request_url
327
+ }
328
+ promise = @client.make_request_async(:get, path_template, options)
329
+
330
+ promise = promise.then do |result|
331
+ http_response = result.response
332
+ status_code = http_response.status
333
+ response_content = http_response.body
334
+ unless status_code == 200
335
+ error_model = JSON.load(response_content)
336
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
337
+ end
338
+
339
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
340
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
341
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
342
+ # Deserialize Response
343
+ if status_code == 200
344
+ begin
345
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
346
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::Cluster.mapper()
347
+ result.body = @client.deserialize(result_mapper, parsed_response)
348
+ rescue Exception => e
349
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
350
+ end
351
+ end
352
+
353
+ result
354
+ end
355
+
356
+ promise.execute
357
+ end
358
+
359
+ #
360
+ # Get the IP address, port of all the compute nodes in the cluster.
361
+ #
362
+ # @param resource_group_name [String] Name of the resource group to which the
363
+ # resource belongs.
364
+ # @param cluster_name [String] The name of the cluster within the specified
365
+ # resource group. Cluster names can only contain a combination of alphanumeric
366
+ # characters along with dash (-) and underscore (_). The name must be from 1
367
+ # through 64 characters long.
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [Array<RemoteLoginInformation>] operation results.
372
+ #
373
+ def list_remote_login_information(resource_group_name, cluster_name, custom_headers:nil)
374
+ first_page = list_remote_login_information_as_lazy(resource_group_name, cluster_name, custom_headers:custom_headers)
375
+ first_page.get_all_items
376
+ end
377
+
378
+ #
379
+ # Get the IP address, port of all the compute nodes in the cluster.
380
+ #
381
+ # @param resource_group_name [String] Name of the resource group to which the
382
+ # resource belongs.
383
+ # @param cluster_name [String] The name of the cluster within the specified
384
+ # resource group. Cluster names can only contain a combination of alphanumeric
385
+ # characters along with dash (-) and underscore (_). The name must be from 1
386
+ # through 64 characters long.
387
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
388
+ # will be added to the HTTP request.
389
+ #
390
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
391
+ #
392
+ def list_remote_login_information_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
393
+ list_remote_login_information_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
394
+ end
395
+
396
+ #
397
+ # Get the IP address, port of all the compute nodes in the cluster.
398
+ #
399
+ # @param resource_group_name [String] Name of the resource group to which the
400
+ # resource belongs.
401
+ # @param cluster_name [String] The name of the cluster within the specified
402
+ # resource group. Cluster names can only contain a combination of alphanumeric
403
+ # characters along with dash (-) and underscore (_). The name must be from 1
404
+ # through 64 characters long.
405
+ # @param [Hash{String => String}] A hash of custom headers that will be added
406
+ # to the HTTP request.
407
+ #
408
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
409
+ #
410
+ def list_remote_login_information_async(resource_group_name, cluster_name, custom_headers:nil)
411
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
412
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
413
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
414
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
415
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
416
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
417
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
418
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
419
+
420
+
421
+ request_headers = {}
422
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
423
+
424
+ # Set Headers
425
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
426
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
427
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}/listRemoteLoginInformation'
428
+
429
+ request_url = @base_url || @client.base_url
430
+
431
+ options = {
432
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
433
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
434
+ query_params: {'api-version' => @client.api_version},
435
+ headers: request_headers.merge(custom_headers || {}),
436
+ base_url: request_url
437
+ }
438
+ promise = @client.make_request_async(:post, path_template, options)
439
+
440
+ promise = promise.then do |result|
441
+ http_response = result.response
442
+ status_code = http_response.status
443
+ response_content = http_response.body
444
+ unless status_code == 200
445
+ error_model = JSON.load(response_content)
446
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
447
+ end
448
+
449
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
450
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
451
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
452
+ # Deserialize Response
453
+ if status_code == 200
454
+ begin
455
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
456
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::RemoteLoginInformationListResult.mapper()
457
+ result.body = @client.deserialize(result_mapper, parsed_response)
458
+ rescue Exception => e
459
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
460
+ end
461
+ end
462
+
463
+ result
464
+ end
465
+
466
+ promise.execute
467
+ end
468
+
469
+ #
470
+ # Gets information about the Clusters associated with the subscription.
471
+ #
472
+ # @param clusters_list_options [ClustersListOptions] Additional parameters for
473
+ # the operation
474
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
475
+ # will be added to the HTTP request.
476
+ #
477
+ # @return [Array<Cluster>] operation results.
478
+ #
479
+ def list(clusters_list_options:nil, custom_headers:nil)
480
+ first_page = list_as_lazy(clusters_list_options:clusters_list_options, custom_headers:custom_headers)
481
+ first_page.get_all_items
482
+ end
483
+
484
+ #
485
+ # Gets information about the Clusters associated with the subscription.
486
+ #
487
+ # @param clusters_list_options [ClustersListOptions] Additional parameters for
488
+ # the operation
489
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
490
+ # will be added to the HTTP request.
491
+ #
492
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
493
+ #
494
+ def list_with_http_info(clusters_list_options:nil, custom_headers:nil)
495
+ list_async(clusters_list_options:clusters_list_options, custom_headers:custom_headers).value!
496
+ end
497
+
498
+ #
499
+ # Gets information about the Clusters associated with the subscription.
500
+ #
501
+ # @param clusters_list_options [ClustersListOptions] Additional parameters for
502
+ # the operation
503
+ # @param [Hash{String => String}] A hash of custom headers that will be added
504
+ # to the HTTP request.
505
+ #
506
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
507
+ #
508
+ def list_async(clusters_list_options:nil, custom_headers:nil)
509
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
510
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
511
+
512
+ filter = nil
513
+ select = nil
514
+ max_results = nil
515
+ unless clusters_list_options.nil?
516
+ filter = clusters_list_options.filter
517
+ end
518
+ unless clusters_list_options.nil?
519
+ select = clusters_list_options.select
520
+ end
521
+ unless clusters_list_options.nil?
522
+ max_results = clusters_list_options.maxResults
523
+ end
524
+
525
+ request_headers = {}
526
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
527
+
528
+ # Set Headers
529
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
530
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
531
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.BatchAI/clusters'
532
+
533
+ request_url = @base_url || @client.base_url
534
+
535
+ options = {
536
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
537
+ path_params: {'subscriptionId' => @client.subscription_id},
538
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'maxresults' => max_results},
539
+ headers: request_headers.merge(custom_headers || {}),
540
+ base_url: request_url
541
+ }
542
+ promise = @client.make_request_async(:get, path_template, options)
543
+
544
+ promise = promise.then do |result|
545
+ http_response = result.response
546
+ status_code = http_response.status
547
+ response_content = http_response.body
548
+ unless status_code == 200
549
+ error_model = JSON.load(response_content)
550
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
551
+ end
552
+
553
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
554
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
555
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
556
+ # Deserialize Response
557
+ if status_code == 200
558
+ begin
559
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
560
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::ClusterListResult.mapper()
561
+ result.body = @client.deserialize(result_mapper, parsed_response)
562
+ rescue Exception => e
563
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
564
+ end
565
+ end
566
+
567
+ result
568
+ end
569
+
570
+ promise.execute
571
+ end
572
+
573
+ #
574
+ # Gets information about the Clusters associated within the specified resource
575
+ # group.
576
+ #
577
+ # @param resource_group_name [String] Name of the resource group to which the
578
+ # resource belongs.
579
+ # @param clusters_list_by_resource_group_options
580
+ # [ClustersListByResourceGroupOptions] Additional parameters for the operation
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [Array<Cluster>] operation results.
585
+ #
586
+ def list_by_resource_group(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil)
587
+ first_page = list_by_resource_group_as_lazy(resource_group_name, clusters_list_by_resource_group_options:clusters_list_by_resource_group_options, custom_headers:custom_headers)
588
+ first_page.get_all_items
589
+ end
590
+
591
+ #
592
+ # Gets information about the Clusters associated within the specified resource
593
+ # group.
594
+ #
595
+ # @param resource_group_name [String] Name of the resource group to which the
596
+ # resource belongs.
597
+ # @param clusters_list_by_resource_group_options
598
+ # [ClustersListByResourceGroupOptions] Additional parameters for the operation
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
603
+ #
604
+ def list_by_resource_group_with_http_info(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil)
605
+ list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options:clusters_list_by_resource_group_options, custom_headers:custom_headers).value!
606
+ end
607
+
608
+ #
609
+ # Gets information about the Clusters associated within the specified resource
610
+ # group.
611
+ #
612
+ # @param resource_group_name [String] Name of the resource group to which the
613
+ # resource belongs.
614
+ # @param clusters_list_by_resource_group_options
615
+ # [ClustersListByResourceGroupOptions] Additional parameters for the operation
616
+ # @param [Hash{String => String}] A hash of custom headers that will be added
617
+ # to the HTTP request.
618
+ #
619
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
620
+ #
621
+ def list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil)
622
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
623
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
624
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
625
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
626
+
627
+ filter = nil
628
+ select = nil
629
+ max_results = nil
630
+ unless clusters_list_by_resource_group_options.nil?
631
+ filter = clusters_list_by_resource_group_options.filter
632
+ end
633
+ unless clusters_list_by_resource_group_options.nil?
634
+ select = clusters_list_by_resource_group_options.select
635
+ end
636
+ unless clusters_list_by_resource_group_options.nil?
637
+ max_results = clusters_list_by_resource_group_options.maxResults
638
+ end
639
+
640
+ request_headers = {}
641
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
642
+
643
+ # Set Headers
644
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
645
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
646
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters'
647
+
648
+ request_url = @base_url || @client.base_url
649
+
650
+ options = {
651
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
652
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
653
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'maxresults' => max_results},
654
+ headers: request_headers.merge(custom_headers || {}),
655
+ base_url: request_url
656
+ }
657
+ promise = @client.make_request_async(:get, path_template, options)
658
+
659
+ promise = promise.then do |result|
660
+ http_response = result.response
661
+ status_code = http_response.status
662
+ response_content = http_response.body
663
+ unless status_code == 200
664
+ error_model = JSON.load(response_content)
665
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
666
+ end
667
+
668
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
669
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
670
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
671
+ # Deserialize Response
672
+ if status_code == 200
673
+ begin
674
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
675
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::ClusterListResult.mapper()
676
+ result.body = @client.deserialize(result_mapper, parsed_response)
677
+ rescue Exception => e
678
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
679
+ end
680
+ end
681
+
682
+ result
683
+ end
684
+
685
+ promise.execute
686
+ end
687
+
688
+ #
689
+ # Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can
690
+ # be run on the same cluster.
691
+ #
692
+ # @param resource_group_name [String] Name of the resource group to which the
693
+ # resource belongs.
694
+ # @param cluster_name [String] The name of the cluster within the specified
695
+ # resource group. Cluster names can only contain a combination of alphanumeric
696
+ # characters along with dash (-) and underscore (_). The name must be from 1
697
+ # through 64 characters long.
698
+ # @param parameters [ClusterCreateParameters] The parameters to provide for
699
+ # cluster creation.
700
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
701
+ # will be added to the HTTP request.
702
+ #
703
+ # @return [Cluster] operation results.
704
+ #
705
+ def begin_create(resource_group_name, cluster_name, parameters, custom_headers:nil)
706
+ response = begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
707
+ response.body unless response.nil?
708
+ end
709
+
710
+ #
711
+ # Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can
712
+ # be run on the same cluster.
713
+ #
714
+ # @param resource_group_name [String] Name of the resource group to which the
715
+ # resource belongs.
716
+ # @param cluster_name [String] The name of the cluster within the specified
717
+ # resource group. Cluster names can only contain a combination of alphanumeric
718
+ # characters along with dash (-) and underscore (_). The name must be from 1
719
+ # through 64 characters long.
720
+ # @param parameters [ClusterCreateParameters] The parameters to provide for
721
+ # cluster creation.
722
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
723
+ # will be added to the HTTP request.
724
+ #
725
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
726
+ #
727
+ def begin_create_with_http_info(resource_group_name, cluster_name, parameters, custom_headers:nil)
728
+ begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:custom_headers).value!
729
+ end
730
+
731
+ #
732
+ # Adds a cluster. A cluster is a collection of compute nodes. Multiple jobs can
733
+ # be run on the same cluster.
734
+ #
735
+ # @param resource_group_name [String] Name of the resource group to which the
736
+ # resource belongs.
737
+ # @param cluster_name [String] The name of the cluster within the specified
738
+ # resource group. Cluster names can only contain a combination of alphanumeric
739
+ # characters along with dash (-) and underscore (_). The name must be from 1
740
+ # through 64 characters long.
741
+ # @param parameters [ClusterCreateParameters] The parameters to provide for
742
+ # cluster creation.
743
+ # @param [Hash{String => String}] A hash of custom headers that will be added
744
+ # to the HTTP request.
745
+ #
746
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
747
+ #
748
+ def begin_create_async(resource_group_name, cluster_name, parameters, custom_headers:nil)
749
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
750
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
751
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
752
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
753
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
754
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
755
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
756
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
757
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
758
+
759
+
760
+ request_headers = {}
761
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
762
+
763
+ # Set Headers
764
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
765
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
766
+
767
+ # Serialize Request
768
+ request_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::ClusterCreateParameters.mapper()
769
+ request_content = @client.serialize(request_mapper, parameters)
770
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
771
+
772
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}'
773
+
774
+ request_url = @base_url || @client.base_url
775
+
776
+ options = {
777
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
778
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
779
+ query_params: {'api-version' => @client.api_version},
780
+ body: request_content,
781
+ headers: request_headers.merge(custom_headers || {}),
782
+ base_url: request_url
783
+ }
784
+ promise = @client.make_request_async(:put, path_template, options)
785
+
786
+ promise = promise.then do |result|
787
+ http_response = result.response
788
+ status_code = http_response.status
789
+ response_content = http_response.body
790
+ unless status_code == 200 || status_code == 202
791
+ error_model = JSON.load(response_content)
792
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
793
+ end
794
+
795
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
796
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
797
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
798
+ # Deserialize Response
799
+ if status_code == 200
800
+ begin
801
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
802
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::Cluster.mapper()
803
+ result.body = @client.deserialize(result_mapper, parsed_response)
804
+ rescue Exception => e
805
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
806
+ end
807
+ end
808
+
809
+ result
810
+ end
811
+
812
+ promise.execute
813
+ end
814
+
815
+ #
816
+ # Deletes a Cluster.
817
+ #
818
+ # @param resource_group_name [String] Name of the resource group to which the
819
+ # resource belongs.
820
+ # @param cluster_name [String] The name of the cluster within the specified
821
+ # resource group. Cluster names can only contain a combination of alphanumeric
822
+ # characters along with dash (-) and underscore (_). The name must be from 1
823
+ # through 64 characters long.
824
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
825
+ # will be added to the HTTP request.
826
+ #
827
+ #
828
+ def begin_delete(resource_group_name, cluster_name, custom_headers:nil)
829
+ response = begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
830
+ nil
831
+ end
832
+
833
+ #
834
+ # Deletes a Cluster.
835
+ #
836
+ # @param resource_group_name [String] Name of the resource group to which the
837
+ # resource belongs.
838
+ # @param cluster_name [String] The name of the cluster within the specified
839
+ # resource group. Cluster names can only contain a combination of alphanumeric
840
+ # characters along with dash (-) and underscore (_). The name must be from 1
841
+ # through 64 characters long.
842
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
843
+ # will be added to the HTTP request.
844
+ #
845
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
846
+ #
847
+ def begin_delete_with_http_info(resource_group_name, cluster_name, custom_headers:nil)
848
+ begin_delete_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
849
+ end
850
+
851
+ #
852
+ # Deletes a Cluster.
853
+ #
854
+ # @param resource_group_name [String] Name of the resource group to which the
855
+ # resource belongs.
856
+ # @param cluster_name [String] The name of the cluster within the specified
857
+ # resource group. Cluster names can only contain a combination of alphanumeric
858
+ # characters along with dash (-) and underscore (_). The name must be from 1
859
+ # through 64 characters long.
860
+ # @param [Hash{String => String}] A hash of custom headers that will be added
861
+ # to the HTTP request.
862
+ #
863
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
864
+ #
865
+ def begin_delete_async(resource_group_name, cluster_name, custom_headers:nil)
866
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
867
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
868
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
869
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
870
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
871
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
872
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
873
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
874
+
875
+
876
+ request_headers = {}
877
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
878
+
879
+ # Set Headers
880
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
881
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
882
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/clusters/{clusterName}'
883
+
884
+ request_url = @base_url || @client.base_url
885
+
886
+ options = {
887
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
888
+ path_params: {'resourceGroupName' => resource_group_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
889
+ query_params: {'api-version' => @client.api_version},
890
+ headers: request_headers.merge(custom_headers || {}),
891
+ base_url: request_url
892
+ }
893
+ promise = @client.make_request_async(:delete, path_template, options)
894
+
895
+ promise = promise.then do |result|
896
+ http_response = result.response
897
+ status_code = http_response.status
898
+ response_content = http_response.body
899
+ unless status_code == 200 || status_code == 202 || status_code == 204
900
+ error_model = JSON.load(response_content)
901
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
902
+ end
903
+
904
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
905
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
906
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
907
+
908
+ result
909
+ end
910
+
911
+ promise.execute
912
+ end
913
+
914
+ #
915
+ # Get the IP address, port of all the compute nodes in the cluster.
916
+ #
917
+ # @param next_page_link [String] The NextLink from the previous successful call
918
+ # to List operation.
919
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
920
+ # will be added to the HTTP request.
921
+ #
922
+ # @return [RemoteLoginInformationListResult] operation results.
923
+ #
924
+ def list_remote_login_information_next(next_page_link, custom_headers:nil)
925
+ response = list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value!
926
+ response.body unless response.nil?
927
+ end
928
+
929
+ #
930
+ # Get the IP address, port of all the compute nodes in the cluster.
931
+ #
932
+ # @param next_page_link [String] The NextLink from the previous successful call
933
+ # to List operation.
934
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
935
+ # will be added to the HTTP request.
936
+ #
937
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
938
+ #
939
+ def list_remote_login_information_next_with_http_info(next_page_link, custom_headers:nil)
940
+ list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value!
941
+ end
942
+
943
+ #
944
+ # Get the IP address, port of all the compute nodes in the cluster.
945
+ #
946
+ # @param next_page_link [String] The NextLink from the previous successful call
947
+ # to List operation.
948
+ # @param [Hash{String => String}] A hash of custom headers that will be added
949
+ # to the HTTP request.
950
+ #
951
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
952
+ #
953
+ def list_remote_login_information_next_async(next_page_link, custom_headers:nil)
954
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
955
+
956
+
957
+ request_headers = {}
958
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
959
+
960
+ # Set Headers
961
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
962
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
963
+ path_template = '{nextLink}'
964
+
965
+ request_url = @base_url || @client.base_url
966
+
967
+ options = {
968
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
969
+ skip_encoding_path_params: {'nextLink' => next_page_link},
970
+ headers: request_headers.merge(custom_headers || {}),
971
+ base_url: request_url
972
+ }
973
+ promise = @client.make_request_async(:post, path_template, options)
974
+
975
+ promise = promise.then do |result|
976
+ http_response = result.response
977
+ status_code = http_response.status
978
+ response_content = http_response.body
979
+ unless status_code == 200
980
+ error_model = JSON.load(response_content)
981
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
982
+ end
983
+
984
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
985
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
986
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
987
+ # Deserialize Response
988
+ if status_code == 200
989
+ begin
990
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
991
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::RemoteLoginInformationListResult.mapper()
992
+ result.body = @client.deserialize(result_mapper, parsed_response)
993
+ rescue Exception => e
994
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
995
+ end
996
+ end
997
+
998
+ result
999
+ end
1000
+
1001
+ promise.execute
1002
+ end
1003
+
1004
+ #
1005
+ # Gets information about the Clusters associated with the subscription.
1006
+ #
1007
+ # @param next_page_link [String] The NextLink from the previous successful call
1008
+ # to List operation.
1009
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1010
+ # will be added to the HTTP request.
1011
+ #
1012
+ # @return [ClusterListResult] operation results.
1013
+ #
1014
+ def list_next(next_page_link, custom_headers:nil)
1015
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
1016
+ response.body unless response.nil?
1017
+ end
1018
+
1019
+ #
1020
+ # Gets information about the Clusters associated with the subscription.
1021
+ #
1022
+ # @param next_page_link [String] The NextLink from the previous successful call
1023
+ # to List operation.
1024
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1025
+ # will be added to the HTTP request.
1026
+ #
1027
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1028
+ #
1029
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
1030
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
1031
+ end
1032
+
1033
+ #
1034
+ # Gets information about the Clusters associated with the subscription.
1035
+ #
1036
+ # @param next_page_link [String] The NextLink from the previous successful call
1037
+ # to List operation.
1038
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1039
+ # to the HTTP request.
1040
+ #
1041
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1042
+ #
1043
+ def list_next_async(next_page_link, custom_headers:nil)
1044
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1045
+
1046
+
1047
+ request_headers = {}
1048
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1049
+
1050
+ # Set Headers
1051
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1052
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1053
+ path_template = '{nextLink}'
1054
+
1055
+ request_url = @base_url || @client.base_url
1056
+
1057
+ options = {
1058
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1059
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1060
+ headers: request_headers.merge(custom_headers || {}),
1061
+ base_url: request_url
1062
+ }
1063
+ promise = @client.make_request_async(:get, path_template, options)
1064
+
1065
+ promise = promise.then do |result|
1066
+ http_response = result.response
1067
+ status_code = http_response.status
1068
+ response_content = http_response.body
1069
+ unless status_code == 200
1070
+ error_model = JSON.load(response_content)
1071
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1072
+ end
1073
+
1074
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1075
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1076
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1077
+ # Deserialize Response
1078
+ if status_code == 200
1079
+ begin
1080
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1081
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::ClusterListResult.mapper()
1082
+ result.body = @client.deserialize(result_mapper, parsed_response)
1083
+ rescue Exception => e
1084
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1085
+ end
1086
+ end
1087
+
1088
+ result
1089
+ end
1090
+
1091
+ promise.execute
1092
+ end
1093
+
1094
+ #
1095
+ # Gets information about the Clusters associated within the specified resource
1096
+ # group.
1097
+ #
1098
+ # @param next_page_link [String] The NextLink from the previous successful call
1099
+ # to List operation.
1100
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1101
+ # will be added to the HTTP request.
1102
+ #
1103
+ # @return [ClusterListResult] operation results.
1104
+ #
1105
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1106
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1107
+ response.body unless response.nil?
1108
+ end
1109
+
1110
+ #
1111
+ # Gets information about the Clusters associated within the specified resource
1112
+ # group.
1113
+ #
1114
+ # @param next_page_link [String] The NextLink from the previous successful call
1115
+ # to List operation.
1116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1117
+ # will be added to the HTTP request.
1118
+ #
1119
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1120
+ #
1121
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1122
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1123
+ end
1124
+
1125
+ #
1126
+ # Gets information about the Clusters associated within the specified resource
1127
+ # group.
1128
+ #
1129
+ # @param next_page_link [String] The NextLink from the previous successful call
1130
+ # to List operation.
1131
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1132
+ # to the HTTP request.
1133
+ #
1134
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1135
+ #
1136
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1137
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1138
+
1139
+
1140
+ request_headers = {}
1141
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1142
+
1143
+ # Set Headers
1144
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1145
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1146
+ path_template = '{nextLink}'
1147
+
1148
+ request_url = @base_url || @client.base_url
1149
+
1150
+ options = {
1151
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1152
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1153
+ headers: request_headers.merge(custom_headers || {}),
1154
+ base_url: request_url
1155
+ }
1156
+ promise = @client.make_request_async(:get, path_template, options)
1157
+
1158
+ promise = promise.then do |result|
1159
+ http_response = result.response
1160
+ status_code = http_response.status
1161
+ response_content = http_response.body
1162
+ unless status_code == 200
1163
+ error_model = JSON.load(response_content)
1164
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1165
+ end
1166
+
1167
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1168
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1169
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1170
+ # Deserialize Response
1171
+ if status_code == 200
1172
+ begin
1173
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1174
+ result_mapper = Azure::BatchAI::Mgmt::V2018_03_01::Models::ClusterListResult.mapper()
1175
+ result.body = @client.deserialize(result_mapper, parsed_response)
1176
+ rescue Exception => e
1177
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1178
+ end
1179
+ end
1180
+
1181
+ result
1182
+ end
1183
+
1184
+ promise.execute
1185
+ end
1186
+
1187
+ #
1188
+ # Get the IP address, port of all the compute nodes in the cluster.
1189
+ #
1190
+ # @param resource_group_name [String] Name of the resource group to which the
1191
+ # resource belongs.
1192
+ # @param cluster_name [String] The name of the cluster within the specified
1193
+ # resource group. Cluster names can only contain a combination of alphanumeric
1194
+ # characters along with dash (-) and underscore (_). The name must be from 1
1195
+ # through 64 characters long.
1196
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1197
+ # will be added to the HTTP request.
1198
+ #
1199
+ # @return [RemoteLoginInformationListResult] which provide lazy access to pages
1200
+ # of the response.
1201
+ #
1202
+ def list_remote_login_information_as_lazy(resource_group_name, cluster_name, custom_headers:nil)
1203
+ response = list_remote_login_information_async(resource_group_name, cluster_name, custom_headers:custom_headers).value!
1204
+ unless response.nil?
1205
+ page = response.body
1206
+ page.next_method = Proc.new do |next_page_link|
1207
+ list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers)
1208
+ end
1209
+ page
1210
+ end
1211
+ end
1212
+
1213
+ #
1214
+ # Gets information about the Clusters associated with the subscription.
1215
+ #
1216
+ # @param clusters_list_options [ClustersListOptions] Additional parameters for
1217
+ # the operation
1218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1219
+ # will be added to the HTTP request.
1220
+ #
1221
+ # @return [ClusterListResult] which provide lazy access to pages of the
1222
+ # response.
1223
+ #
1224
+ def list_as_lazy(clusters_list_options:nil, custom_headers:nil)
1225
+ response = list_async(clusters_list_options:clusters_list_options, custom_headers:custom_headers).value!
1226
+ unless response.nil?
1227
+ page = response.body
1228
+ page.next_method = Proc.new do |next_page_link|
1229
+ list_next_async(next_page_link, custom_headers:custom_headers)
1230
+ end
1231
+ page
1232
+ end
1233
+ end
1234
+
1235
+ #
1236
+ # Gets information about the Clusters associated within the specified resource
1237
+ # group.
1238
+ #
1239
+ # @param resource_group_name [String] Name of the resource group to which the
1240
+ # resource belongs.
1241
+ # @param clusters_list_by_resource_group_options
1242
+ # [ClustersListByResourceGroupOptions] Additional parameters for the operation
1243
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1244
+ # will be added to the HTTP request.
1245
+ #
1246
+ # @return [ClusterListResult] which provide lazy access to pages of the
1247
+ # response.
1248
+ #
1249
+ def list_by_resource_group_as_lazy(resource_group_name, clusters_list_by_resource_group_options:nil, custom_headers:nil)
1250
+ response = list_by_resource_group_async(resource_group_name, clusters_list_by_resource_group_options:clusters_list_by_resource_group_options, custom_headers:custom_headers).value!
1251
+ unless response.nil?
1252
+ page = response.body
1253
+ page.next_method = Proc.new do |next_page_link|
1254
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1255
+ end
1256
+ page
1257
+ end
1258
+ end
1259
+
1260
+ end
1261
+ end