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,125 @@
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 '2018-05-01/generated/azure_mgmt_batchai/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::BatchAI::Mgmt::V2018_05_01
23
+ autoload :Operations, '2018-05-01/generated/azure_mgmt_batchai/operations.rb'
24
+ autoload :Usages, '2018-05-01/generated/azure_mgmt_batchai/usages.rb'
25
+ autoload :Workspaces, '2018-05-01/generated/azure_mgmt_batchai/workspaces.rb'
26
+ autoload :Experiments, '2018-05-01/generated/azure_mgmt_batchai/experiments.rb'
27
+ autoload :Jobs, '2018-05-01/generated/azure_mgmt_batchai/jobs.rb'
28
+ autoload :FileServers, '2018-05-01/generated/azure_mgmt_batchai/file_servers.rb'
29
+ autoload :Clusters, '2018-05-01/generated/azure_mgmt_batchai/clusters.rb'
30
+ autoload :BatchAIManagementClient, '2018-05-01/generated/azure_mgmt_batchai/batch_aimanagement_client.rb'
31
+
32
+ module Models
33
+ autoload :PyTorchSettings, '2018-05-01/generated/azure_mgmt_batchai/models/py_torch_settings.rb'
34
+ autoload :UsageName, '2018-05-01/generated/azure_mgmt_batchai/models/usage_name.rb'
35
+ autoload :TensorFlowSettings, '2018-05-01/generated/azure_mgmt_batchai/models/tensor_flow_settings.rb'
36
+ autoload :ListUsagesResult, '2018-05-01/generated/azure_mgmt_batchai/models/list_usages_result.rb'
37
+ autoload :CaffeSettings, '2018-05-01/generated/azure_mgmt_batchai/models/caffe_settings.rb'
38
+ autoload :SshConfiguration, '2018-05-01/generated/azure_mgmt_batchai/models/ssh_configuration.rb'
39
+ autoload :Caffe2Settings, '2018-05-01/generated/azure_mgmt_batchai/models/caffe2settings.rb'
40
+ autoload :ResourceId, '2018-05-01/generated/azure_mgmt_batchai/models/resource_id.rb'
41
+ autoload :ChainerSettings, '2018-05-01/generated/azure_mgmt_batchai/models/chainer_settings.rb'
42
+ autoload :DataDisks, '2018-05-01/generated/azure_mgmt_batchai/models/data_disks.rb'
43
+ autoload :FileServerListResult, '2018-05-01/generated/azure_mgmt_batchai/models/file_server_list_result.rb'
44
+ autoload :MountSettings, '2018-05-01/generated/azure_mgmt_batchai/models/mount_settings.rb'
45
+ autoload :FileServerCreateParameters, '2018-05-01/generated/azure_mgmt_batchai/models/file_server_create_parameters.rb'
46
+ autoload :FileServersListByWorkspaceOptions, '2018-05-01/generated/azure_mgmt_batchai/models/file_servers_list_by_workspace_options.rb'
47
+ autoload :AutoScaleSettings, '2018-05-01/generated/azure_mgmt_batchai/models/auto_scale_settings.rb'
48
+ autoload :CustomToolkitSettings, '2018-05-01/generated/azure_mgmt_batchai/models/custom_toolkit_settings.rb'
49
+ autoload :ImageReference, '2018-05-01/generated/azure_mgmt_batchai/models/image_reference.rb'
50
+ autoload :CustomMpiSettings, '2018-05-01/generated/azure_mgmt_batchai/models/custom_mpi_settings.rb'
51
+ autoload :EnvironmentVariable, '2018-05-01/generated/azure_mgmt_batchai/models/environment_variable.rb'
52
+ autoload :HorovodSettings, '2018-05-01/generated/azure_mgmt_batchai/models/horovod_settings.rb'
53
+ autoload :SetupTask, '2018-05-01/generated/azure_mgmt_batchai/models/setup_task.rb'
54
+ autoload :JobPreparation, '2018-05-01/generated/azure_mgmt_batchai/models/job_preparation.rb'
55
+ autoload :AzureFileShareReference, '2018-05-01/generated/azure_mgmt_batchai/models/azure_file_share_reference.rb'
56
+ autoload :InputDirectory, '2018-05-01/generated/azure_mgmt_batchai/models/input_directory.rb'
57
+ autoload :FileServerReference, '2018-05-01/generated/azure_mgmt_batchai/models/file_server_reference.rb'
58
+ autoload :OutputDirectory, '2018-05-01/generated/azure_mgmt_batchai/models/output_directory.rb'
59
+ autoload :MountVolumes, '2018-05-01/generated/azure_mgmt_batchai/models/mount_volumes.rb'
60
+ autoload :JobBasePropertiesConstraints, '2018-05-01/generated/azure_mgmt_batchai/models/job_base_properties_constraints.rb'
61
+ autoload :PerformanceCountersSettings, '2018-05-01/generated/azure_mgmt_batchai/models/performance_counters_settings.rb'
62
+ autoload :JobCreateParameters, '2018-05-01/generated/azure_mgmt_batchai/models/job_create_parameters.rb'
63
+ autoload :NodeStateCounts, '2018-05-01/generated/azure_mgmt_batchai/models/node_state_counts.rb'
64
+ autoload :JobPropertiesConstraints, '2018-05-01/generated/azure_mgmt_batchai/models/job_properties_constraints.rb'
65
+ autoload :ClusterUpdateParameters, '2018-05-01/generated/azure_mgmt_batchai/models/cluster_update_parameters.rb'
66
+ autoload :JobPropertiesExecutionInfo, '2018-05-01/generated/azure_mgmt_batchai/models/job_properties_execution_info.rb'
67
+ autoload :BatchAIError, '2018-05-01/generated/azure_mgmt_batchai/models/batch_aierror.rb'
68
+ autoload :JobsListOutputFilesOptions, '2018-05-01/generated/azure_mgmt_batchai/models/jobs_list_output_files_options.rb'
69
+ autoload :ClusterListResult, '2018-05-01/generated/azure_mgmt_batchai/models/cluster_list_result.rb'
70
+ autoload :JobListResult, '2018-05-01/generated/azure_mgmt_batchai/models/job_list_result.rb'
71
+ autoload :ImageSourceRegistry, '2018-05-01/generated/azure_mgmt_batchai/models/image_source_registry.rb'
72
+ autoload :RemoteLoginInformation, '2018-05-01/generated/azure_mgmt_batchai/models/remote_login_information.rb'
73
+ autoload :CNTKsettings, '2018-05-01/generated/azure_mgmt_batchai/models/cntksettings.rb'
74
+ autoload :RemoteLoginInformationListResult, '2018-05-01/generated/azure_mgmt_batchai/models/remote_login_information_list_result.rb'
75
+ autoload :UserAccountSettings, '2018-05-01/generated/azure_mgmt_batchai/models/user_account_settings.rb'
76
+ autoload :File, '2018-05-01/generated/azure_mgmt_batchai/models/file.rb'
77
+ autoload :ManualScaleSettings, '2018-05-01/generated/azure_mgmt_batchai/models/manual_scale_settings.rb'
78
+ autoload :FileListResult, '2018-05-01/generated/azure_mgmt_batchai/models/file_list_result.rb'
79
+ autoload :VirtualMachineConfiguration, '2018-05-01/generated/azure_mgmt_batchai/models/virtual_machine_configuration.rb'
80
+ autoload :Resource, '2018-05-01/generated/azure_mgmt_batchai/models/resource.rb'
81
+ autoload :AzureStorageCredentialsInfo, '2018-05-01/generated/azure_mgmt_batchai/models/azure_storage_credentials_info.rb'
82
+ autoload :ProxyResource, '2018-05-01/generated/azure_mgmt_batchai/models/proxy_resource.rb'
83
+ autoload :UnmanagedFileSystemReference, '2018-05-01/generated/azure_mgmt_batchai/models/unmanaged_file_system_reference.rb'
84
+ autoload :NodeSetup, '2018-05-01/generated/azure_mgmt_batchai/models/node_setup.rb'
85
+ autoload :NameValuePair, '2018-05-01/generated/azure_mgmt_batchai/models/name_value_pair.rb'
86
+ autoload :OperationDisplay, '2018-05-01/generated/azure_mgmt_batchai/models/operation_display.rb'
87
+ autoload :PrivateRegistryCredentials, '2018-05-01/generated/azure_mgmt_batchai/models/private_registry_credentials.rb'
88
+ autoload :Operation, '2018-05-01/generated/azure_mgmt_batchai/models/operation.rb'
89
+ autoload :Usage, '2018-05-01/generated/azure_mgmt_batchai/models/usage.rb'
90
+ autoload :OperationListResult, '2018-05-01/generated/azure_mgmt_batchai/models/operation_list_result.rb'
91
+ autoload :ScaleSettings, '2018-05-01/generated/azure_mgmt_batchai/models/scale_settings.rb'
92
+ autoload :JobsListByExperimentOptions, '2018-05-01/generated/azure_mgmt_batchai/models/jobs_list_by_experiment_options.rb'
93
+ autoload :AzureBlobFileSystemReference, '2018-05-01/generated/azure_mgmt_batchai/models/azure_blob_file_system_reference.rb'
94
+ autoload :WorkspaceListResult, '2018-05-01/generated/azure_mgmt_batchai/models/workspace_list_result.rb'
95
+ autoload :ClusterCreateParameters, '2018-05-01/generated/azure_mgmt_batchai/models/cluster_create_parameters.rb'
96
+ autoload :WorkspaceCreateParameters, '2018-05-01/generated/azure_mgmt_batchai/models/workspace_create_parameters.rb'
97
+ autoload :ContainerSettings, '2018-05-01/generated/azure_mgmt_batchai/models/container_settings.rb'
98
+ autoload :WorkspaceUpdateParameters, '2018-05-01/generated/azure_mgmt_batchai/models/workspace_update_parameters.rb'
99
+ autoload :EnvironmentVariableWithSecretValue, '2018-05-01/generated/azure_mgmt_batchai/models/environment_variable_with_secret_value.rb'
100
+ autoload :ExperimentsListByWorkspaceOptions, '2018-05-01/generated/azure_mgmt_batchai/models/experiments_list_by_workspace_options.rb'
101
+ autoload :ClustersListByWorkspaceOptions, '2018-05-01/generated/azure_mgmt_batchai/models/clusters_list_by_workspace_options.rb'
102
+ autoload :ExperimentListResult, '2018-05-01/generated/azure_mgmt_batchai/models/experiment_list_result.rb'
103
+ autoload :AppInsightsReference, '2018-05-01/generated/azure_mgmt_batchai/models/app_insights_reference.rb'
104
+ autoload :WorkspacesListOptions, '2018-05-01/generated/azure_mgmt_batchai/models/workspaces_list_options.rb'
105
+ autoload :KeyVaultSecretReference, '2018-05-01/generated/azure_mgmt_batchai/models/key_vault_secret_reference.rb'
106
+ autoload :WorkspacesListByResourceGroupOptions, '2018-05-01/generated/azure_mgmt_batchai/models/workspaces_list_by_resource_group_options.rb'
107
+ autoload :FileServer, '2018-05-01/generated/azure_mgmt_batchai/models/file_server.rb'
108
+ autoload :Cluster, '2018-05-01/generated/azure_mgmt_batchai/models/cluster.rb'
109
+ autoload :Job, '2018-05-01/generated/azure_mgmt_batchai/models/job.rb'
110
+ autoload :Workspace, '2018-05-01/generated/azure_mgmt_batchai/models/workspace.rb'
111
+ autoload :Experiment, '2018-05-01/generated/azure_mgmt_batchai/models/experiment.rb'
112
+ autoload :UsageUnit, '2018-05-01/generated/azure_mgmt_batchai/models/usage_unit.rb'
113
+ autoload :CachingType, '2018-05-01/generated/azure_mgmt_batchai/models/caching_type.rb'
114
+ autoload :StorageAccountType, '2018-05-01/generated/azure_mgmt_batchai/models/storage_account_type.rb'
115
+ autoload :FileServerProvisioningState, '2018-05-01/generated/azure_mgmt_batchai/models/file_server_provisioning_state.rb'
116
+ autoload :VmPriority, '2018-05-01/generated/azure_mgmt_batchai/models/vm_priority.rb'
117
+ autoload :DeallocationOption, '2018-05-01/generated/azure_mgmt_batchai/models/deallocation_option.rb'
118
+ autoload :ProvisioningState, '2018-05-01/generated/azure_mgmt_batchai/models/provisioning_state.rb'
119
+ autoload :AllocationState, '2018-05-01/generated/azure_mgmt_batchai/models/allocation_state.rb'
120
+ autoload :JobPriority, '2018-05-01/generated/azure_mgmt_batchai/models/job_priority.rb'
121
+ autoload :ToolType, '2018-05-01/generated/azure_mgmt_batchai/models/tool_type.rb'
122
+ autoload :ExecutionState, '2018-05-01/generated/azure_mgmt_batchai/models/execution_state.rb'
123
+ autoload :FileType, '2018-05-01/generated/azure_mgmt_batchai/models/file_type.rb'
124
+ end
125
+ end
@@ -0,0 +1,155 @@
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_05_01
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class BatchAIManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] The subscriptionID for the Azure user.
21
+ attr_accessor :subscription_id
22
+
23
+ # @return [String] Specifies the version of API used for this request.
24
+ attr_reader :api_version
25
+
26
+ # @return [String] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [Operations] operations
39
+ attr_reader :operations
40
+
41
+ # @return [Usages] usages
42
+ attr_reader :usages
43
+
44
+ # @return [Workspaces] workspaces
45
+ attr_reader :workspaces
46
+
47
+ # @return [Experiments] experiments
48
+ attr_reader :experiments
49
+
50
+ # @return [Jobs] jobs
51
+ attr_reader :jobs
52
+
53
+ # @return [FileServers] file_servers
54
+ attr_reader :file_servers
55
+
56
+ # @return [Clusters] clusters
57
+ attr_reader :clusters
58
+
59
+ #
60
+ # Creates initializes a new instance of the BatchAIManagementClient class.
61
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
62
+ # @param base_url [String] the base URI of the service.
63
+ # @param options [Array] filters to be applied to the HTTP requests.
64
+ #
65
+ def initialize(credentials = nil, base_url = nil, options = nil)
66
+ super(credentials, options)
67
+ @base_url = base_url || 'https://management.azure.com'
68
+
69
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
70
+ @credentials = credentials
71
+
72
+ @operations = Operations.new(self)
73
+ @usages = Usages.new(self)
74
+ @workspaces = Workspaces.new(self)
75
+ @experiments = Experiments.new(self)
76
+ @jobs = Jobs.new(self)
77
+ @file_servers = FileServers.new(self)
78
+ @clusters = Clusters.new(self)
79
+ @api_version = '2018-05-01'
80
+ @accept_language = 'en-US'
81
+ @long_running_operation_retry_timeout = 30
82
+ @generate_client_request_id = true
83
+ add_telemetry
84
+ end
85
+
86
+ #
87
+ # Makes a request and returns the body of the response.
88
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
89
+ # @param path [String] the path, relative to {base_url}.
90
+ # @param options [Hash{String=>String}] specifying any request options like :body.
91
+ # @return [Hash{String=>String}] containing the body of the response.
92
+ # Example:
93
+ #
94
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
95
+ # path = "/path"
96
+ # options = {
97
+ # body: request_content,
98
+ # query_params: {'api-version' => '2016-02-01'}
99
+ # }
100
+ # result = @client.make_request(:put, path, options)
101
+ #
102
+ def make_request(method, path, options = {})
103
+ result = make_request_with_http_info(method, path, options)
104
+ result.body unless result.nil?
105
+ end
106
+
107
+ #
108
+ # Makes a request and returns the operation response.
109
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
110
+ # @param path [String] the path, relative to {base_url}.
111
+ # @param options [Hash{String=>String}] specifying any request options like :body.
112
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
113
+ #
114
+ def make_request_with_http_info(method, path, options = {})
115
+ result = make_request_async(method, path, options).value!
116
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
117
+ result
118
+ end
119
+
120
+ #
121
+ # Makes a request asynchronously.
122
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
123
+ # @param path [String] the path, relative to {base_url}.
124
+ # @param options [Hash{String=>String}] specifying any request options like :body.
125
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
126
+ #
127
+ def make_request_async(method, path, options = {})
128
+ fail ArgumentError, 'method is nil' if method.nil?
129
+ fail ArgumentError, 'path is nil' if path.nil?
130
+
131
+ request_url = options[:base_url] || @base_url
132
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
133
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
134
+ end
135
+
136
+ request_headers = @request_headers
137
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
138
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
139
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
140
+
141
+ super(request_url, method, path, options)
142
+ end
143
+
144
+
145
+ private
146
+ #
147
+ # Adds telemetry information.
148
+ #
149
+ def add_telemetry
150
+ sdk_information = 'azure_mgmt_batchai'
151
+ sdk_information = "#{sdk_information}/0.17.0"
152
+ add_user_agent_information(sdk_information)
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,1122 @@
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_05_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
+ # Creates a Cluster in the given Workspace.
26
+ #
27
+ # @param resource_group_name [String] Name of the resource group to which the
28
+ # resource belongs.
29
+ # @param workspace_name [String] The name of the workspace. Workspace names can
30
+ # only contain a combination of alphanumeric characters along with dash (-) and
31
+ # underscore (_). The name must be from 1 through 64 characters long.
32
+ # @param cluster_name [String] The name of the cluster within the specified
33
+ # resource group. Cluster names can only contain a combination of alphanumeric
34
+ # characters along with dash (-) and underscore (_). The name must be from 1
35
+ # through 64 characters long.
36
+ # @param parameters [ClusterCreateParameters] The parameters to provide for the
37
+ # Cluster creation.
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [Cluster] operation results.
42
+ #
43
+ def create(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
44
+ response = create_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:custom_headers).value!
45
+ response.body unless response.nil?
46
+ end
47
+
48
+ #
49
+ # @param resource_group_name [String] Name of the resource group to which the
50
+ # resource belongs.
51
+ # @param workspace_name [String] The name of the workspace. Workspace names can
52
+ # only contain a combination of alphanumeric characters along with dash (-) and
53
+ # underscore (_). The name must be from 1 through 64 characters long.
54
+ # @param cluster_name [String] The name of the cluster within the specified
55
+ # resource group. Cluster names can only contain a combination of alphanumeric
56
+ # characters along with dash (-) and underscore (_). The name must be from 1
57
+ # through 64 characters long.
58
+ # @param parameters [ClusterCreateParameters] The parameters to provide for the
59
+ # Cluster creation.
60
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
61
+ # will be added to the HTTP request.
62
+ #
63
+ # @return [Concurrent::Promise] promise which provides async access to http
64
+ # response.
65
+ #
66
+ def create_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
67
+ # Send request
68
+ promise = begin_create_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:custom_headers)
69
+
70
+ promise = promise.then do |response|
71
+ # Defining deserialization method.
72
+ deserialize_method = lambda do |parsed_response|
73
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Cluster.mapper()
74
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
75
+ end
76
+
77
+ # Waiting for response.
78
+ @client.get_long_running_operation_result(response, deserialize_method)
79
+ end
80
+
81
+ promise
82
+ end
83
+
84
+ #
85
+ # Updates properties of a Cluster.
86
+ #
87
+ # @param resource_group_name [String] Name of the resource group to which the
88
+ # resource belongs.
89
+ # @param workspace_name [String] The name of the workspace. Workspace names can
90
+ # only contain a combination of alphanumeric characters along with dash (-) and
91
+ # underscore (_). The name must be from 1 through 64 characters long.
92
+ # @param cluster_name [String] The name of the cluster within the specified
93
+ # resource group. Cluster names can only contain a combination of alphanumeric
94
+ # characters along with dash (-) and underscore (_). The name must be from 1
95
+ # through 64 characters long.
96
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
97
+ # update.
98
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
99
+ # will be added to the HTTP request.
100
+ #
101
+ # @return [Cluster] operation results.
102
+ #
103
+ def update(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
104
+ response = update_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:custom_headers).value!
105
+ response.body unless response.nil?
106
+ end
107
+
108
+ #
109
+ # Updates properties of a Cluster.
110
+ #
111
+ # @param resource_group_name [String] Name of the resource group to which the
112
+ # resource belongs.
113
+ # @param workspace_name [String] The name of the workspace. Workspace names can
114
+ # only contain a combination of alphanumeric characters along with dash (-) and
115
+ # underscore (_). The name must be from 1 through 64 characters long.
116
+ # @param cluster_name [String] The name of the cluster within the specified
117
+ # resource group. Cluster names can only contain a combination of alphanumeric
118
+ # characters along with dash (-) and underscore (_). The name must be from 1
119
+ # through 64 characters long.
120
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
121
+ # update.
122
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
123
+ # will be added to the HTTP request.
124
+ #
125
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
126
+ #
127
+ def update_with_http_info(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
128
+ update_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:custom_headers).value!
129
+ end
130
+
131
+ #
132
+ # Updates properties of a Cluster.
133
+ #
134
+ # @param resource_group_name [String] Name of the resource group to which the
135
+ # resource belongs.
136
+ # @param workspace_name [String] The name of the workspace. Workspace names can
137
+ # only contain a combination of alphanumeric characters along with dash (-) and
138
+ # underscore (_). The name must be from 1 through 64 characters long.
139
+ # @param cluster_name [String] The name of the cluster within the specified
140
+ # resource group. Cluster names can only contain a combination of alphanumeric
141
+ # characters along with dash (-) and underscore (_). The name must be from 1
142
+ # through 64 characters long.
143
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
144
+ # update.
145
+ # @param [Hash{String => String}] A hash of custom headers that will be added
146
+ # to the HTTP request.
147
+ #
148
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
149
+ #
150
+ def update_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
151
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
152
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
153
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
154
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
155
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
156
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
157
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
158
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
159
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
160
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w_]+$$')).nil?
161
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
162
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
163
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
164
+
165
+
166
+ request_headers = {}
167
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
168
+
169
+ # Set Headers
170
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
171
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
172
+
173
+ # Serialize Request
174
+ request_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::ClusterUpdateParameters.mapper()
175
+ request_content = @client.serialize(request_mapper, parameters)
176
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
177
+
178
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}'
179
+
180
+ request_url = @base_url || @client.base_url
181
+
182
+ options = {
183
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
184
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
185
+ query_params: {'api-version' => @client.api_version},
186
+ body: request_content,
187
+ headers: request_headers.merge(custom_headers || {}),
188
+ base_url: request_url
189
+ }
190
+ promise = @client.make_request_async(:patch, path_template, options)
191
+
192
+ promise = promise.then do |result|
193
+ http_response = result.response
194
+ status_code = http_response.status
195
+ response_content = http_response.body
196
+ unless status_code == 200
197
+ error_model = JSON.load(response_content)
198
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
199
+ end
200
+
201
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
202
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
203
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
204
+ # Deserialize Response
205
+ if status_code == 200
206
+ begin
207
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
208
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Cluster.mapper()
209
+ result.body = @client.deserialize(result_mapper, parsed_response)
210
+ rescue Exception => e
211
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
212
+ end
213
+ end
214
+
215
+ result
216
+ end
217
+
218
+ promise.execute
219
+ end
220
+
221
+ #
222
+ # Deletes a Cluster.
223
+ #
224
+ # @param resource_group_name [String] Name of the resource group to which the
225
+ # resource belongs.
226
+ # @param workspace_name [String] The name of the workspace. Workspace names can
227
+ # only contain a combination of alphanumeric characters along with dash (-) and
228
+ # underscore (_). The name must be from 1 through 64 characters long.
229
+ # @param cluster_name [String] The name of the cluster within the specified
230
+ # resource group. Cluster names can only contain a combination of alphanumeric
231
+ # characters along with dash (-) and underscore (_). The name must be from 1
232
+ # through 64 characters long.
233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
234
+ # will be added to the HTTP request.
235
+ #
236
+ def delete(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
237
+ response = delete_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
238
+ nil
239
+ end
240
+
241
+ #
242
+ # @param resource_group_name [String] Name of the resource group to which the
243
+ # resource belongs.
244
+ # @param workspace_name [String] The name of the workspace. Workspace names can
245
+ # only contain a combination of alphanumeric characters along with dash (-) and
246
+ # underscore (_). The name must be from 1 through 64 characters long.
247
+ # @param cluster_name [String] The name of the cluster within the specified
248
+ # resource group. Cluster names can only contain a combination of alphanumeric
249
+ # characters along with dash (-) and underscore (_). The name must be from 1
250
+ # through 64 characters long.
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [Concurrent::Promise] promise which provides async access to http
255
+ # response.
256
+ #
257
+ def delete_async(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
258
+ # Send request
259
+ promise = begin_delete_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers)
260
+
261
+ promise = promise.then do |response|
262
+ # Defining deserialization method.
263
+ deserialize_method = lambda do |parsed_response|
264
+ end
265
+
266
+ # Waiting for response.
267
+ @client.get_long_running_operation_result(response, deserialize_method)
268
+ end
269
+
270
+ promise
271
+ end
272
+
273
+ #
274
+ # Gets information about a Cluster.
275
+ #
276
+ # @param resource_group_name [String] Name of the resource group to which the
277
+ # resource belongs.
278
+ # @param workspace_name [String] The name of the workspace. Workspace names can
279
+ # only contain a combination of alphanumeric characters along with dash (-) and
280
+ # underscore (_). The name must be from 1 through 64 characters long.
281
+ # @param cluster_name [String] The name of the cluster within the specified
282
+ # resource group. Cluster names can only contain a combination of alphanumeric
283
+ # characters along with dash (-) and underscore (_). The name must be from 1
284
+ # through 64 characters long.
285
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
286
+ # will be added to the HTTP request.
287
+ #
288
+ # @return [Cluster] operation results.
289
+ #
290
+ def get(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
291
+ response = get_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
292
+ response.body unless response.nil?
293
+ end
294
+
295
+ #
296
+ # Gets information about a Cluster.
297
+ #
298
+ # @param resource_group_name [String] Name of the resource group to which the
299
+ # resource belongs.
300
+ # @param workspace_name [String] The name of the workspace. Workspace names can
301
+ # only contain a combination of alphanumeric characters along with dash (-) and
302
+ # underscore (_). The name must be from 1 through 64 characters long.
303
+ # @param cluster_name [String] The name of the cluster within the specified
304
+ # resource group. Cluster names can only contain a combination of alphanumeric
305
+ # characters along with dash (-) and underscore (_). The name must be from 1
306
+ # through 64 characters long.
307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
308
+ # will be added to the HTTP request.
309
+ #
310
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
311
+ #
312
+ def get_with_http_info(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
313
+ get_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
314
+ end
315
+
316
+ #
317
+ # Gets information about a Cluster.
318
+ #
319
+ # @param resource_group_name [String] Name of the resource group to which the
320
+ # resource belongs.
321
+ # @param workspace_name [String] The name of the workspace. Workspace names can
322
+ # only contain a combination of alphanumeric characters along with dash (-) and
323
+ # underscore (_). The name must be from 1 through 64 characters long.
324
+ # @param cluster_name [String] The name of the cluster within the specified
325
+ # resource group. Cluster names can only contain a combination of alphanumeric
326
+ # characters along with dash (-) and underscore (_). The name must be from 1
327
+ # through 64 characters long.
328
+ # @param [Hash{String => String}] A hash of custom headers that will be added
329
+ # to the HTTP request.
330
+ #
331
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
332
+ #
333
+ def get_async(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
334
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
335
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
336
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
337
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
338
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
339
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
340
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
341
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
342
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
343
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w_]+$$')).nil?
344
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
345
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
346
+
347
+
348
+ request_headers = {}
349
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
350
+
351
+ # Set Headers
352
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
353
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
354
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}'
355
+
356
+ request_url = @base_url || @client.base_url
357
+
358
+ options = {
359
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
360
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
361
+ query_params: {'api-version' => @client.api_version},
362
+ headers: request_headers.merge(custom_headers || {}),
363
+ base_url: request_url
364
+ }
365
+ promise = @client.make_request_async(:get, path_template, options)
366
+
367
+ promise = promise.then do |result|
368
+ http_response = result.response
369
+ status_code = http_response.status
370
+ response_content = http_response.body
371
+ unless status_code == 200
372
+ error_model = JSON.load(response_content)
373
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
374
+ end
375
+
376
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
377
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
378
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
379
+ # Deserialize Response
380
+ if status_code == 200
381
+ begin
382
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
383
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Cluster.mapper()
384
+ result.body = @client.deserialize(result_mapper, parsed_response)
385
+ rescue Exception => e
386
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
387
+ end
388
+ end
389
+
390
+ result
391
+ end
392
+
393
+ promise.execute
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 workspace_name [String] The name of the workspace. Workspace names can
402
+ # only contain a combination of alphanumeric characters along with dash (-) and
403
+ # underscore (_). The name must be from 1 through 64 characters long.
404
+ # @param cluster_name [String] The name of the cluster within the specified
405
+ # resource group. Cluster names can only contain a combination of alphanumeric
406
+ # characters along with dash (-) and underscore (_). The name must be from 1
407
+ # through 64 characters long.
408
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
409
+ # will be added to the HTTP request.
410
+ #
411
+ # @return [Array<RemoteLoginInformation>] operation results.
412
+ #
413
+ def list_remote_login_information(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
414
+ first_page = list_remote_login_information_as_lazy(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers)
415
+ first_page.get_all_items
416
+ end
417
+
418
+ #
419
+ # Get the IP address, port of all the compute nodes in the Cluster.
420
+ #
421
+ # @param resource_group_name [String] Name of the resource group to which the
422
+ # resource belongs.
423
+ # @param workspace_name [String] The name of the workspace. Workspace names can
424
+ # only contain a combination of alphanumeric characters along with dash (-) and
425
+ # underscore (_). The name must be from 1 through 64 characters long.
426
+ # @param cluster_name [String] The name of the cluster within the specified
427
+ # resource group. Cluster names can only contain a combination of alphanumeric
428
+ # characters along with dash (-) and underscore (_). The name must be from 1
429
+ # through 64 characters long.
430
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
431
+ # will be added to the HTTP request.
432
+ #
433
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
434
+ #
435
+ def list_remote_login_information_with_http_info(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
436
+ list_remote_login_information_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
437
+ end
438
+
439
+ #
440
+ # Get the IP address, port of all the compute nodes in the Cluster.
441
+ #
442
+ # @param resource_group_name [String] Name of the resource group to which the
443
+ # resource belongs.
444
+ # @param workspace_name [String] The name of the workspace. Workspace names can
445
+ # only contain a combination of alphanumeric characters along with dash (-) and
446
+ # underscore (_). The name must be from 1 through 64 characters long.
447
+ # @param cluster_name [String] The name of the cluster within the specified
448
+ # resource group. Cluster names can only contain a combination of alphanumeric
449
+ # characters along with dash (-) and underscore (_). The name must be from 1
450
+ # through 64 characters long.
451
+ # @param [Hash{String => String}] A hash of custom headers that will be added
452
+ # to the HTTP request.
453
+ #
454
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
455
+ #
456
+ def list_remote_login_information_async(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
457
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
458
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
459
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
460
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
461
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
462
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
463
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
464
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
465
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
466
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w_]+$$')).nil?
467
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
468
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
469
+
470
+
471
+ request_headers = {}
472
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
473
+
474
+ # Set Headers
475
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
476
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
477
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}/listRemoteLoginInformation'
478
+
479
+ request_url = @base_url || @client.base_url
480
+
481
+ options = {
482
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
483
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
484
+ query_params: {'api-version' => @client.api_version},
485
+ headers: request_headers.merge(custom_headers || {}),
486
+ base_url: request_url
487
+ }
488
+ promise = @client.make_request_async(:post, path_template, options)
489
+
490
+ promise = promise.then do |result|
491
+ http_response = result.response
492
+ status_code = http_response.status
493
+ response_content = http_response.body
494
+ unless status_code == 200
495
+ error_model = JSON.load(response_content)
496
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
497
+ end
498
+
499
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
500
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
501
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
502
+ # Deserialize Response
503
+ if status_code == 200
504
+ begin
505
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
506
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::RemoteLoginInformationListResult.mapper()
507
+ result.body = @client.deserialize(result_mapper, parsed_response)
508
+ rescue Exception => e
509
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
510
+ end
511
+ end
512
+
513
+ result
514
+ end
515
+
516
+ promise.execute
517
+ end
518
+
519
+ #
520
+ # Gets information about Clusters associated with the given Workspace.
521
+ #
522
+ # @param resource_group_name [String] Name of the resource group to which the
523
+ # resource belongs.
524
+ # @param workspace_name [String] The name of the workspace. Workspace names can
525
+ # only contain a combination of alphanumeric characters along with dash (-) and
526
+ # underscore (_). The name must be from 1 through 64 characters long.
527
+ # @param clusters_list_by_workspace_options [ClustersListByWorkspaceOptions]
528
+ # Additional parameters for the operation
529
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
530
+ # will be added to the HTTP request.
531
+ #
532
+ # @return [Array<Cluster>] operation results.
533
+ #
534
+ def list_by_workspace(resource_group_name, workspace_name, clusters_list_by_workspace_options:nil, custom_headers:nil)
535
+ first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, clusters_list_by_workspace_options:clusters_list_by_workspace_options, custom_headers:custom_headers)
536
+ first_page.get_all_items
537
+ end
538
+
539
+ #
540
+ # Gets information about Clusters associated with the given Workspace.
541
+ #
542
+ # @param resource_group_name [String] Name of the resource group to which the
543
+ # resource belongs.
544
+ # @param workspace_name [String] The name of the workspace. Workspace names can
545
+ # only contain a combination of alphanumeric characters along with dash (-) and
546
+ # underscore (_). The name must be from 1 through 64 characters long.
547
+ # @param clusters_list_by_workspace_options [ClustersListByWorkspaceOptions]
548
+ # Additional parameters for the operation
549
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
550
+ # will be added to the HTTP request.
551
+ #
552
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
553
+ #
554
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, clusters_list_by_workspace_options:nil, custom_headers:nil)
555
+ list_by_workspace_async(resource_group_name, workspace_name, clusters_list_by_workspace_options:clusters_list_by_workspace_options, custom_headers:custom_headers).value!
556
+ end
557
+
558
+ #
559
+ # Gets information about Clusters associated with the given Workspace.
560
+ #
561
+ # @param resource_group_name [String] Name of the resource group to which the
562
+ # resource belongs.
563
+ # @param workspace_name [String] The name of the workspace. Workspace names can
564
+ # only contain a combination of alphanumeric characters along with dash (-) and
565
+ # underscore (_). The name must be from 1 through 64 characters long.
566
+ # @param clusters_list_by_workspace_options [ClustersListByWorkspaceOptions]
567
+ # Additional parameters for the operation
568
+ # @param [Hash{String => String}] A hash of custom headers that will be added
569
+ # to the HTTP request.
570
+ #
571
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
572
+ #
573
+ def list_by_workspace_async(resource_group_name, workspace_name, clusters_list_by_workspace_options:nil, custom_headers:nil)
574
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
575
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
576
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
577
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
578
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
579
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
580
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
581
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
582
+
583
+ max_results = nil
584
+ unless clusters_list_by_workspace_options.nil?
585
+ max_results = clusters_list_by_workspace_options.maxResults
586
+ end
587
+
588
+ request_headers = {}
589
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
590
+
591
+ # Set Headers
592
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
593
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
594
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters'
595
+
596
+ request_url = @base_url || @client.base_url
597
+
598
+ options = {
599
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
600
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
601
+ query_params: {'api-version' => @client.api_version,'maxresults' => max_results},
602
+ headers: request_headers.merge(custom_headers || {}),
603
+ base_url: request_url
604
+ }
605
+ promise = @client.make_request_async(:get, path_template, options)
606
+
607
+ promise = promise.then do |result|
608
+ http_response = result.response
609
+ status_code = http_response.status
610
+ response_content = http_response.body
611
+ unless status_code == 200
612
+ error_model = JSON.load(response_content)
613
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
614
+ end
615
+
616
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
617
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
618
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
619
+ # Deserialize Response
620
+ if status_code == 200
621
+ begin
622
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
623
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::ClusterListResult.mapper()
624
+ result.body = @client.deserialize(result_mapper, parsed_response)
625
+ rescue Exception => e
626
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
627
+ end
628
+ end
629
+
630
+ result
631
+ end
632
+
633
+ promise.execute
634
+ end
635
+
636
+ #
637
+ # Creates a Cluster in the given Workspace.
638
+ #
639
+ # @param resource_group_name [String] Name of the resource group to which the
640
+ # resource belongs.
641
+ # @param workspace_name [String] The name of the workspace. Workspace names can
642
+ # only contain a combination of alphanumeric characters along with dash (-) and
643
+ # underscore (_). The name must be from 1 through 64 characters long.
644
+ # @param cluster_name [String] The name of the cluster within the specified
645
+ # resource group. Cluster names can only contain a combination of alphanumeric
646
+ # characters along with dash (-) and underscore (_). The name must be from 1
647
+ # through 64 characters long.
648
+ # @param parameters [ClusterCreateParameters] The parameters to provide for the
649
+ # Cluster creation.
650
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
651
+ # will be added to the HTTP request.
652
+ #
653
+ # @return [Cluster] operation results.
654
+ #
655
+ def begin_create(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
656
+ response = begin_create_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:custom_headers).value!
657
+ response.body unless response.nil?
658
+ end
659
+
660
+ #
661
+ # Creates a Cluster in the given Workspace.
662
+ #
663
+ # @param resource_group_name [String] Name of the resource group to which the
664
+ # resource belongs.
665
+ # @param workspace_name [String] The name of the workspace. Workspace names can
666
+ # only contain a combination of alphanumeric characters along with dash (-) and
667
+ # underscore (_). The name must be from 1 through 64 characters long.
668
+ # @param cluster_name [String] The name of the cluster within the specified
669
+ # resource group. Cluster names can only contain a combination of alphanumeric
670
+ # characters along with dash (-) and underscore (_). The name must be from 1
671
+ # through 64 characters long.
672
+ # @param parameters [ClusterCreateParameters] The parameters to provide for the
673
+ # Cluster creation.
674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
675
+ # will be added to the HTTP request.
676
+ #
677
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
678
+ #
679
+ def begin_create_with_http_info(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
680
+ begin_create_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:custom_headers).value!
681
+ end
682
+
683
+ #
684
+ # Creates a Cluster in the given Workspace.
685
+ #
686
+ # @param resource_group_name [String] Name of the resource group to which the
687
+ # resource belongs.
688
+ # @param workspace_name [String] The name of the workspace. Workspace names can
689
+ # only contain a combination of alphanumeric characters along with dash (-) and
690
+ # underscore (_). The name must be from 1 through 64 characters long.
691
+ # @param cluster_name [String] The name of the cluster within the specified
692
+ # resource group. Cluster names can only contain a combination of alphanumeric
693
+ # characters along with dash (-) and underscore (_). The name must be from 1
694
+ # through 64 characters long.
695
+ # @param parameters [ClusterCreateParameters] The parameters to provide for the
696
+ # Cluster creation.
697
+ # @param [Hash{String => String}] A hash of custom headers that will be added
698
+ # to the HTTP request.
699
+ #
700
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
701
+ #
702
+ def begin_create_async(resource_group_name, workspace_name, cluster_name, parameters, custom_headers:nil)
703
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
704
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
705
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
706
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
707
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
708
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
709
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
710
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
711
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
712
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w_]+$$')).nil?
713
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
714
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
715
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
716
+
717
+
718
+ request_headers = {}
719
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
720
+
721
+ # Set Headers
722
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
723
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
724
+
725
+ # Serialize Request
726
+ request_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::ClusterCreateParameters.mapper()
727
+ request_content = @client.serialize(request_mapper, parameters)
728
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
729
+
730
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}'
731
+
732
+ request_url = @base_url || @client.base_url
733
+
734
+ options = {
735
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
736
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
737
+ query_params: {'api-version' => @client.api_version},
738
+ body: request_content,
739
+ headers: request_headers.merge(custom_headers || {}),
740
+ base_url: request_url
741
+ }
742
+ promise = @client.make_request_async(:put, path_template, options)
743
+
744
+ promise = promise.then do |result|
745
+ http_response = result.response
746
+ status_code = http_response.status
747
+ response_content = http_response.body
748
+ unless status_code == 200 || status_code == 202
749
+ error_model = JSON.load(response_content)
750
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
751
+ end
752
+
753
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
754
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
755
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
756
+ # Deserialize Response
757
+ if status_code == 200
758
+ begin
759
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
760
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Cluster.mapper()
761
+ result.body = @client.deserialize(result_mapper, parsed_response)
762
+ rescue Exception => e
763
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
764
+ end
765
+ end
766
+
767
+ result
768
+ end
769
+
770
+ promise.execute
771
+ end
772
+
773
+ #
774
+ # Deletes a Cluster.
775
+ #
776
+ # @param resource_group_name [String] Name of the resource group to which the
777
+ # resource belongs.
778
+ # @param workspace_name [String] The name of the workspace. Workspace names can
779
+ # only contain a combination of alphanumeric characters along with dash (-) and
780
+ # underscore (_). The name must be from 1 through 64 characters long.
781
+ # @param cluster_name [String] The name of the cluster within the specified
782
+ # resource group. Cluster names can only contain a combination of alphanumeric
783
+ # characters along with dash (-) and underscore (_). The name must be from 1
784
+ # through 64 characters long.
785
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
786
+ # will be added to the HTTP request.
787
+ #
788
+ #
789
+ def begin_delete(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
790
+ response = begin_delete_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
791
+ nil
792
+ end
793
+
794
+ #
795
+ # Deletes a Cluster.
796
+ #
797
+ # @param resource_group_name [String] Name of the resource group to which the
798
+ # resource belongs.
799
+ # @param workspace_name [String] The name of the workspace. Workspace names can
800
+ # only contain a combination of alphanumeric characters along with dash (-) and
801
+ # underscore (_). The name must be from 1 through 64 characters long.
802
+ # @param cluster_name [String] The name of the cluster within the specified
803
+ # resource group. Cluster names can only contain a combination of alphanumeric
804
+ # characters along with dash (-) and underscore (_). The name must be from 1
805
+ # through 64 characters long.
806
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
807
+ # will be added to the HTTP request.
808
+ #
809
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
810
+ #
811
+ def begin_delete_with_http_info(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
812
+ begin_delete_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
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 workspace_name [String] The name of the workspace. Workspace names can
821
+ # only contain a combination of alphanumeric characters along with dash (-) and
822
+ # underscore (_). The name must be from 1 through 64 characters long.
823
+ # @param cluster_name [String] The name of the cluster within the specified
824
+ # resource group. Cluster names can only contain a combination of alphanumeric
825
+ # characters along with dash (-) and underscore (_). The name must be from 1
826
+ # through 64 characters long.
827
+ # @param [Hash{String => String}] A hash of custom headers that will be added
828
+ # to the HTTP request.
829
+ #
830
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
831
+ #
832
+ def begin_delete_async(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
833
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
834
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
835
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
836
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
837
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
838
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
839
+ fail ArgumentError, 'cluster_name is nil' if cluster_name.nil?
840
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MaxLength': '64'" if !cluster_name.nil? && cluster_name.length > 64
841
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'MinLength': '1'" if !cluster_name.nil? && cluster_name.length < 1
842
+ fail ArgumentError, "'cluster_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !cluster_name.nil? && cluster_name.match(Regexp.new('^^[-\w_]+$$')).nil?
843
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
844
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
845
+
846
+
847
+ request_headers = {}
848
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
849
+
850
+ # Set Headers
851
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
852
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
853
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/clusters/{clusterName}'
854
+
855
+ request_url = @base_url || @client.base_url
856
+
857
+ options = {
858
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
859
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'clusterName' => cluster_name,'subscriptionId' => @client.subscription_id},
860
+ query_params: {'api-version' => @client.api_version},
861
+ headers: request_headers.merge(custom_headers || {}),
862
+ base_url: request_url
863
+ }
864
+ promise = @client.make_request_async(:delete, path_template, options)
865
+
866
+ promise = promise.then do |result|
867
+ http_response = result.response
868
+ status_code = http_response.status
869
+ response_content = http_response.body
870
+ unless status_code == 200 || status_code == 202 || status_code == 204
871
+ error_model = JSON.load(response_content)
872
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
873
+ end
874
+
875
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
876
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
877
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
878
+
879
+ result
880
+ end
881
+
882
+ promise.execute
883
+ end
884
+
885
+ #
886
+ # Get the IP address, port of all the compute nodes in the Cluster.
887
+ #
888
+ # @param next_page_link [String] The NextLink from the previous successful call
889
+ # to List operation.
890
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
891
+ # will be added to the HTTP request.
892
+ #
893
+ # @return [RemoteLoginInformationListResult] operation results.
894
+ #
895
+ def list_remote_login_information_next(next_page_link, custom_headers:nil)
896
+ response = list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value!
897
+ response.body unless response.nil?
898
+ end
899
+
900
+ #
901
+ # Get the IP address, port of all the compute nodes in the Cluster.
902
+ #
903
+ # @param next_page_link [String] The NextLink from the previous successful call
904
+ # to List operation.
905
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
906
+ # will be added to the HTTP request.
907
+ #
908
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
909
+ #
910
+ def list_remote_login_information_next_with_http_info(next_page_link, custom_headers:nil)
911
+ list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value!
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 [Hash{String => String}] A hash of custom headers that will be added
920
+ # to the HTTP request.
921
+ #
922
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
923
+ #
924
+ def list_remote_login_information_next_async(next_page_link, custom_headers:nil)
925
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
926
+
927
+
928
+ request_headers = {}
929
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
930
+
931
+ # Set Headers
932
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
933
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
934
+ path_template = '{nextLink}'
935
+
936
+ request_url = @base_url || @client.base_url
937
+
938
+ options = {
939
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
940
+ skip_encoding_path_params: {'nextLink' => next_page_link},
941
+ headers: request_headers.merge(custom_headers || {}),
942
+ base_url: request_url
943
+ }
944
+ promise = @client.make_request_async(:post, path_template, options)
945
+
946
+ promise = promise.then do |result|
947
+ http_response = result.response
948
+ status_code = http_response.status
949
+ response_content = http_response.body
950
+ unless status_code == 200
951
+ error_model = JSON.load(response_content)
952
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
953
+ end
954
+
955
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
956
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
957
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
958
+ # Deserialize Response
959
+ if status_code == 200
960
+ begin
961
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
962
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::RemoteLoginInformationListResult.mapper()
963
+ result.body = @client.deserialize(result_mapper, parsed_response)
964
+ rescue Exception => e
965
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
966
+ end
967
+ end
968
+
969
+ result
970
+ end
971
+
972
+ promise.execute
973
+ end
974
+
975
+ #
976
+ # Gets information about Clusters associated with the given Workspace.
977
+ #
978
+ # @param next_page_link [String] The NextLink from the previous successful call
979
+ # to List operation.
980
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
981
+ # will be added to the HTTP request.
982
+ #
983
+ # @return [ClusterListResult] operation results.
984
+ #
985
+ def list_by_workspace_next(next_page_link, custom_headers:nil)
986
+ response = list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
987
+ response.body unless response.nil?
988
+ end
989
+
990
+ #
991
+ # Gets information about Clusters associated with the given Workspace.
992
+ #
993
+ # @param next_page_link [String] The NextLink from the previous successful call
994
+ # to List operation.
995
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
996
+ # will be added to the HTTP request.
997
+ #
998
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
999
+ #
1000
+ def list_by_workspace_next_with_http_info(next_page_link, custom_headers:nil)
1001
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
1002
+ end
1003
+
1004
+ #
1005
+ # Gets information about Clusters associated with the given Workspace.
1006
+ #
1007
+ # @param next_page_link [String] The NextLink from the previous successful call
1008
+ # to List operation.
1009
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1010
+ # to the HTTP request.
1011
+ #
1012
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1013
+ #
1014
+ def list_by_workspace_next_async(next_page_link, custom_headers:nil)
1015
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1016
+
1017
+
1018
+ request_headers = {}
1019
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1020
+
1021
+ # Set Headers
1022
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1023
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1024
+ path_template = '{nextLink}'
1025
+
1026
+ request_url = @base_url || @client.base_url
1027
+
1028
+ options = {
1029
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1030
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1031
+ headers: request_headers.merge(custom_headers || {}),
1032
+ base_url: request_url
1033
+ }
1034
+ promise = @client.make_request_async(:get, path_template, options)
1035
+
1036
+ promise = promise.then do |result|
1037
+ http_response = result.response
1038
+ status_code = http_response.status
1039
+ response_content = http_response.body
1040
+ unless status_code == 200
1041
+ error_model = JSON.load(response_content)
1042
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1043
+ end
1044
+
1045
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1046
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1047
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1048
+ # Deserialize Response
1049
+ if status_code == 200
1050
+ begin
1051
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1052
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::ClusterListResult.mapper()
1053
+ result.body = @client.deserialize(result_mapper, parsed_response)
1054
+ rescue Exception => e
1055
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1056
+ end
1057
+ end
1058
+
1059
+ result
1060
+ end
1061
+
1062
+ promise.execute
1063
+ end
1064
+
1065
+ #
1066
+ # Get the IP address, port of all the compute nodes in the Cluster.
1067
+ #
1068
+ # @param resource_group_name [String] Name of the resource group to which the
1069
+ # resource belongs.
1070
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1071
+ # only contain a combination of alphanumeric characters along with dash (-) and
1072
+ # underscore (_). The name must be from 1 through 64 characters long.
1073
+ # @param cluster_name [String] The name of the cluster within the specified
1074
+ # resource group. Cluster names can only contain a combination of alphanumeric
1075
+ # characters along with dash (-) and underscore (_). The name must be from 1
1076
+ # through 64 characters long.
1077
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1078
+ # will be added to the HTTP request.
1079
+ #
1080
+ # @return [RemoteLoginInformationListResult] which provide lazy access to pages
1081
+ # of the response.
1082
+ #
1083
+ def list_remote_login_information_as_lazy(resource_group_name, workspace_name, cluster_name, custom_headers:nil)
1084
+ response = list_remote_login_information_async(resource_group_name, workspace_name, cluster_name, custom_headers:custom_headers).value!
1085
+ unless response.nil?
1086
+ page = response.body
1087
+ page.next_method = Proc.new do |next_page_link|
1088
+ list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers)
1089
+ end
1090
+ page
1091
+ end
1092
+ end
1093
+
1094
+ #
1095
+ # Gets information about Clusters associated with the given Workspace.
1096
+ #
1097
+ # @param resource_group_name [String] Name of the resource group to which the
1098
+ # resource belongs.
1099
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1100
+ # only contain a combination of alphanumeric characters along with dash (-) and
1101
+ # underscore (_). The name must be from 1 through 64 characters long.
1102
+ # @param clusters_list_by_workspace_options [ClustersListByWorkspaceOptions]
1103
+ # Additional parameters for the operation
1104
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1105
+ # will be added to the HTTP request.
1106
+ #
1107
+ # @return [ClusterListResult] which provide lazy access to pages of the
1108
+ # response.
1109
+ #
1110
+ def list_by_workspace_as_lazy(resource_group_name, workspace_name, clusters_list_by_workspace_options:nil, custom_headers:nil)
1111
+ response = list_by_workspace_async(resource_group_name, workspace_name, clusters_list_by_workspace_options:clusters_list_by_workspace_options, custom_headers:custom_headers).value!
1112
+ unless response.nil?
1113
+ page = response.body
1114
+ page.next_method = Proc.new do |next_page_link|
1115
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers)
1116
+ end
1117
+ page
1118
+ end
1119
+ end
1120
+
1121
+ end
1122
+ end