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,1560 @@
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 Jobs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Jobs 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
+ # Gets a list of Jobs within the specified Experiment.
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 experiment_name [String] The name of the experiment. Experiment names
33
+ # can only contain a combination of alphanumeric characters along with dash (-)
34
+ # and underscore (_). The name must be from 1 through 64 characters long.
35
+ # @param jobs_list_by_experiment_options [JobsListByExperimentOptions]
36
+ # Additional parameters for the operation
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [Array<Job>] operation results.
41
+ #
42
+ def list_by_experiment(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil)
43
+ first_page = list_by_experiment_as_lazy(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:jobs_list_by_experiment_options, custom_headers:custom_headers)
44
+ first_page.get_all_items
45
+ end
46
+
47
+ #
48
+ # Gets a list of Jobs within the specified Experiment.
49
+ #
50
+ # @param resource_group_name [String] Name of the resource group to which the
51
+ # resource belongs.
52
+ # @param workspace_name [String] The name of the workspace. Workspace names can
53
+ # only contain a combination of alphanumeric characters along with dash (-) and
54
+ # underscore (_). The name must be from 1 through 64 characters long.
55
+ # @param experiment_name [String] The name of the experiment. Experiment names
56
+ # can only contain a combination of alphanumeric characters along with dash (-)
57
+ # and underscore (_). The name must be from 1 through 64 characters long.
58
+ # @param jobs_list_by_experiment_options [JobsListByExperimentOptions]
59
+ # Additional parameters for the operation
60
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
61
+ # will be added to the HTTP request.
62
+ #
63
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
64
+ #
65
+ def list_by_experiment_with_http_info(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil)
66
+ list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:jobs_list_by_experiment_options, custom_headers:custom_headers).value!
67
+ end
68
+
69
+ #
70
+ # Gets a list of Jobs within the specified Experiment.
71
+ #
72
+ # @param resource_group_name [String] Name of the resource group to which the
73
+ # resource belongs.
74
+ # @param workspace_name [String] The name of the workspace. Workspace names can
75
+ # only contain a combination of alphanumeric characters along with dash (-) and
76
+ # underscore (_). The name must be from 1 through 64 characters long.
77
+ # @param experiment_name [String] The name of the experiment. Experiment names
78
+ # can only contain a combination of alphanumeric characters along with dash (-)
79
+ # and underscore (_). The name must be from 1 through 64 characters long.
80
+ # @param jobs_list_by_experiment_options [JobsListByExperimentOptions]
81
+ # Additional parameters for the operation
82
+ # @param [Hash{String => String}] A hash of custom headers that will be added
83
+ # to the HTTP request.
84
+ #
85
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
86
+ #
87
+ def list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil)
88
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
89
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
90
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
91
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
92
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
93
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
94
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
95
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
96
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
97
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
98
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
99
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
100
+
101
+ max_results = nil
102
+ unless jobs_list_by_experiment_options.nil?
103
+ max_results = jobs_list_by_experiment_options.maxResults
104
+ end
105
+
106
+ request_headers = {}
107
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
108
+
109
+ # Set Headers
110
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
111
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
112
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs'
113
+
114
+ request_url = @base_url || @client.base_url
115
+
116
+ options = {
117
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
118
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'subscriptionId' => @client.subscription_id},
119
+ query_params: {'api-version' => @client.api_version,'maxresults' => max_results},
120
+ headers: request_headers.merge(custom_headers || {}),
121
+ base_url: request_url
122
+ }
123
+ promise = @client.make_request_async(:get, path_template, options)
124
+
125
+ promise = promise.then do |result|
126
+ http_response = result.response
127
+ status_code = http_response.status
128
+ response_content = http_response.body
129
+ unless status_code == 200
130
+ error_model = JSON.load(response_content)
131
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
132
+ end
133
+
134
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
135
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
136
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
137
+ # Deserialize Response
138
+ if status_code == 200
139
+ begin
140
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
141
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::JobListResult.mapper()
142
+ result.body = @client.deserialize(result_mapper, parsed_response)
143
+ rescue Exception => e
144
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
145
+ end
146
+ end
147
+
148
+ result
149
+ end
150
+
151
+ promise.execute
152
+ end
153
+
154
+ #
155
+ # Creates a Job in the given Experiment.
156
+ #
157
+ # @param resource_group_name [String] Name of the resource group to which the
158
+ # resource belongs.
159
+ # @param workspace_name [String] The name of the workspace. Workspace names can
160
+ # only contain a combination of alphanumeric characters along with dash (-) and
161
+ # underscore (_). The name must be from 1 through 64 characters long.
162
+ # @param experiment_name [String] The name of the experiment. Experiment names
163
+ # can only contain a combination of alphanumeric characters along with dash (-)
164
+ # and underscore (_). The name must be from 1 through 64 characters long.
165
+ # @param job_name [String] The name of the job within the specified resource
166
+ # group. Job names can only contain a combination of alphanumeric characters
167
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
168
+ # characters long.
169
+ # @param parameters [JobCreateParameters] The parameters to provide for job
170
+ # creation.
171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
172
+ # will be added to the HTTP request.
173
+ #
174
+ # @return [Job] operation results.
175
+ #
176
+ def create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil)
177
+ response = create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers).value!
178
+ response.body unless response.nil?
179
+ end
180
+
181
+ #
182
+ # @param resource_group_name [String] Name of the resource group to which the
183
+ # resource belongs.
184
+ # @param workspace_name [String] The name of the workspace. Workspace names can
185
+ # only contain a combination of alphanumeric characters along with dash (-) and
186
+ # underscore (_). The name must be from 1 through 64 characters long.
187
+ # @param experiment_name [String] The name of the experiment. Experiment names
188
+ # can only contain a combination of alphanumeric characters along with dash (-)
189
+ # and underscore (_). The name must be from 1 through 64 characters long.
190
+ # @param job_name [String] The name of the job within the specified resource
191
+ # group. Job names can only contain a combination of alphanumeric characters
192
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
193
+ # characters long.
194
+ # @param parameters [JobCreateParameters] The parameters to provide for job
195
+ # creation.
196
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
197
+ # will be added to the HTTP request.
198
+ #
199
+ # @return [Concurrent::Promise] promise which provides async access to http
200
+ # response.
201
+ #
202
+ def create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil)
203
+ # Send request
204
+ promise = begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers)
205
+
206
+ promise = promise.then do |response|
207
+ # Defining deserialization method.
208
+ deserialize_method = lambda do |parsed_response|
209
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Job.mapper()
210
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
211
+ end
212
+
213
+ # Waiting for response.
214
+ @client.get_long_running_operation_result(response, deserialize_method)
215
+ end
216
+
217
+ promise
218
+ end
219
+
220
+ #
221
+ # Deletes a Job.
222
+ #
223
+ # @param resource_group_name [String] Name of the resource group to which the
224
+ # resource belongs.
225
+ # @param workspace_name [String] The name of the workspace. Workspace names can
226
+ # only contain a combination of alphanumeric characters along with dash (-) and
227
+ # underscore (_). The name must be from 1 through 64 characters long.
228
+ # @param experiment_name [String] The name of the experiment. Experiment names
229
+ # can only contain a combination of alphanumeric characters along with dash (-)
230
+ # and underscore (_). The name must be from 1 through 64 characters long.
231
+ # @param job_name [String] The name of the job within the specified resource
232
+ # group. Job names can only contain a combination of alphanumeric characters
233
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
234
+ # characters long.
235
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
236
+ # will be added to the HTTP request.
237
+ #
238
+ def delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
239
+ response = delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
240
+ nil
241
+ end
242
+
243
+ #
244
+ # @param resource_group_name [String] Name of the resource group to which the
245
+ # resource belongs.
246
+ # @param workspace_name [String] The name of the workspace. Workspace names can
247
+ # only contain a combination of alphanumeric characters along with dash (-) and
248
+ # underscore (_). The name must be from 1 through 64 characters long.
249
+ # @param experiment_name [String] The name of the experiment. Experiment names
250
+ # can only contain a combination of alphanumeric characters along with dash (-)
251
+ # and underscore (_). The name must be from 1 through 64 characters long.
252
+ # @param job_name [String] The name of the job within the specified resource
253
+ # group. Job names can only contain a combination of alphanumeric characters
254
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
255
+ # characters long.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [Concurrent::Promise] promise which provides async access to http
260
+ # response.
261
+ #
262
+ def delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
263
+ # Send request
264
+ promise = begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers)
265
+
266
+ promise = promise.then do |response|
267
+ # Defining deserialization method.
268
+ deserialize_method = lambda do |parsed_response|
269
+ end
270
+
271
+ # Waiting for response.
272
+ @client.get_long_running_operation_result(response, deserialize_method)
273
+ end
274
+
275
+ promise
276
+ end
277
+
278
+ #
279
+ # Gets information about a Job.
280
+ #
281
+ # @param resource_group_name [String] Name of the resource group to which the
282
+ # resource belongs.
283
+ # @param workspace_name [String] The name of the workspace. Workspace names can
284
+ # only contain a combination of alphanumeric characters along with dash (-) and
285
+ # underscore (_). The name must be from 1 through 64 characters long.
286
+ # @param experiment_name [String] The name of the experiment. Experiment names
287
+ # can only contain a combination of alphanumeric characters along with dash (-)
288
+ # and underscore (_). The name must be from 1 through 64 characters long.
289
+ # @param job_name [String] The name of the job within the specified resource
290
+ # group. Job names can only contain a combination of alphanumeric characters
291
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
292
+ # characters long.
293
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
294
+ # will be added to the HTTP request.
295
+ #
296
+ # @return [Job] operation results.
297
+ #
298
+ def get(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
299
+ response = get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
300
+ response.body unless response.nil?
301
+ end
302
+
303
+ #
304
+ # Gets information about a Job.
305
+ #
306
+ # @param resource_group_name [String] Name of the resource group to which the
307
+ # resource belongs.
308
+ # @param workspace_name [String] The name of the workspace. Workspace names can
309
+ # only contain a combination of alphanumeric characters along with dash (-) and
310
+ # underscore (_). The name must be from 1 through 64 characters long.
311
+ # @param experiment_name [String] The name of the experiment. Experiment names
312
+ # can only contain a combination of alphanumeric characters along with dash (-)
313
+ # and underscore (_). The name must be from 1 through 64 characters long.
314
+ # @param job_name [String] The name of the job within the specified resource
315
+ # group. Job names can only contain a combination of alphanumeric characters
316
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
317
+ # characters long.
318
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
319
+ # will be added to the HTTP request.
320
+ #
321
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
322
+ #
323
+ def get_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
324
+ get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
325
+ end
326
+
327
+ #
328
+ # Gets information about a Job.
329
+ #
330
+ # @param resource_group_name [String] Name of the resource group to which the
331
+ # resource belongs.
332
+ # @param workspace_name [String] The name of the workspace. Workspace names can
333
+ # only contain a combination of alphanumeric characters along with dash (-) and
334
+ # underscore (_). The name must be from 1 through 64 characters long.
335
+ # @param experiment_name [String] The name of the experiment. Experiment names
336
+ # can only contain a combination of alphanumeric characters along with dash (-)
337
+ # and underscore (_). The name must be from 1 through 64 characters long.
338
+ # @param job_name [String] The name of the job within the specified resource
339
+ # group. Job names can only contain a combination of alphanumeric characters
340
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
341
+ # characters long.
342
+ # @param [Hash{String => String}] A hash of custom headers that will be added
343
+ # to the HTTP request.
344
+ #
345
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
346
+ #
347
+ def get_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
348
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
349
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
350
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
351
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
352
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
353
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
354
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
355
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
356
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
357
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
358
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
359
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64
360
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1
361
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_name.match(Regexp.new('^^[-\w_]+$$')).nil?
362
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
363
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
364
+
365
+
366
+ request_headers = {}
367
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
368
+
369
+ # Set Headers
370
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
371
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
372
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}'
373
+
374
+ request_url = @base_url || @client.base_url
375
+
376
+ options = {
377
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
378
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
379
+ query_params: {'api-version' => @client.api_version},
380
+ headers: request_headers.merge(custom_headers || {}),
381
+ base_url: request_url
382
+ }
383
+ promise = @client.make_request_async(:get, path_template, options)
384
+
385
+ promise = promise.then do |result|
386
+ http_response = result.response
387
+ status_code = http_response.status
388
+ response_content = http_response.body
389
+ unless status_code == 200
390
+ error_model = JSON.load(response_content)
391
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
392
+ end
393
+
394
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
395
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
396
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
397
+ # Deserialize Response
398
+ if status_code == 200
399
+ begin
400
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
401
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Job.mapper()
402
+ result.body = @client.deserialize(result_mapper, parsed_response)
403
+ rescue Exception => e
404
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
405
+ end
406
+ end
407
+
408
+ result
409
+ end
410
+
411
+ promise.execute
412
+ end
413
+
414
+ #
415
+ # List all directories and files inside the given directory of the Job's output
416
+ # directory (if the output directory is on Azure File Share or Azure Storage
417
+ # Container).
418
+ #
419
+ # @param resource_group_name [String] Name of the resource group to which the
420
+ # resource belongs.
421
+ # @param workspace_name [String] The name of the workspace. Workspace names can
422
+ # only contain a combination of alphanumeric characters along with dash (-) and
423
+ # underscore (_). The name must be from 1 through 64 characters long.
424
+ # @param experiment_name [String] The name of the experiment. Experiment names
425
+ # can only contain a combination of alphanumeric characters along with dash (-)
426
+ # and underscore (_). The name must be from 1 through 64 characters long.
427
+ # @param job_name [String] The name of the job within the specified resource
428
+ # group. Job names can only contain a combination of alphanumeric characters
429
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
430
+ # characters long.
431
+ # @param jobs_list_output_files_options [JobsListOutputFilesOptions] Additional
432
+ # parameters for the operation
433
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
434
+ # will be added to the HTTP request.
435
+ #
436
+ # @return [Array<File>] operation results.
437
+ #
438
+ def list_output_files(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:nil)
439
+ first_page = list_output_files_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:custom_headers)
440
+ first_page.get_all_items
441
+ end
442
+
443
+ #
444
+ # List all directories and files inside the given directory of the Job's output
445
+ # directory (if the output directory is on Azure File Share or Azure Storage
446
+ # Container).
447
+ #
448
+ # @param resource_group_name [String] Name of the resource group to which the
449
+ # resource belongs.
450
+ # @param workspace_name [String] The name of the workspace. Workspace names can
451
+ # only contain a combination of alphanumeric characters along with dash (-) and
452
+ # underscore (_). The name must be from 1 through 64 characters long.
453
+ # @param experiment_name [String] The name of the experiment. Experiment names
454
+ # can only contain a combination of alphanumeric characters along with dash (-)
455
+ # and underscore (_). The name must be from 1 through 64 characters long.
456
+ # @param job_name [String] The name of the job within the specified resource
457
+ # group. Job names can only contain a combination of alphanumeric characters
458
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
459
+ # characters long.
460
+ # @param jobs_list_output_files_options [JobsListOutputFilesOptions] Additional
461
+ # parameters for the operation
462
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
463
+ # will be added to the HTTP request.
464
+ #
465
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
466
+ #
467
+ def list_output_files_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:nil)
468
+ list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:custom_headers).value!
469
+ end
470
+
471
+ #
472
+ # List all directories and files inside the given directory of the Job's output
473
+ # directory (if the output directory is on Azure File Share or Azure Storage
474
+ # Container).
475
+ #
476
+ # @param resource_group_name [String] Name of the resource group to which the
477
+ # resource belongs.
478
+ # @param workspace_name [String] The name of the workspace. Workspace names can
479
+ # only contain a combination of alphanumeric characters along with dash (-) and
480
+ # underscore (_). The name must be from 1 through 64 characters long.
481
+ # @param experiment_name [String] The name of the experiment. Experiment names
482
+ # can only contain a combination of alphanumeric characters along with dash (-)
483
+ # and underscore (_). The name must be from 1 through 64 characters long.
484
+ # @param job_name [String] The name of the job within the specified resource
485
+ # group. Job names can only contain a combination of alphanumeric characters
486
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
487
+ # characters long.
488
+ # @param jobs_list_output_files_options [JobsListOutputFilesOptions] Additional
489
+ # parameters for the operation
490
+ # @param [Hash{String => String}] A hash of custom headers that will be added
491
+ # to the HTTP request.
492
+ #
493
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
494
+ #
495
+ def list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:nil)
496
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
497
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
498
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
499
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
500
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
501
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
502
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
503
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
504
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
505
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
506
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
507
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64
508
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1
509
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_name.match(Regexp.new('^^[-\w_]+$$')).nil?
510
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
511
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
512
+ fail ArgumentError, 'jobs_list_output_files_options is nil' if jobs_list_output_files_options.nil?
513
+
514
+ outputdirectoryid = nil
515
+ directory = nil
516
+ linkexpiryinminutes = nil
517
+ max_results = nil
518
+ unless jobs_list_output_files_options.nil?
519
+ outputdirectoryid = jobs_list_output_files_options.outputdirectoryid
520
+ end
521
+ unless jobs_list_output_files_options.nil?
522
+ directory = jobs_list_output_files_options.directory
523
+ end
524
+ unless jobs_list_output_files_options.nil?
525
+ linkexpiryinminutes = jobs_list_output_files_options.linkexpiryinminutes
526
+ end
527
+ unless jobs_list_output_files_options.nil?
528
+ max_results = jobs_list_output_files_options.maxResults
529
+ end
530
+
531
+ request_headers = {}
532
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
533
+
534
+ # Set Headers
535
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
536
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
537
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listOutputFiles'
538
+
539
+ request_url = @base_url || @client.base_url
540
+
541
+ options = {
542
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
543
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
544
+ query_params: {'api-version' => @client.api_version,'outputdirectoryid' => outputdirectoryid,'directory' => directory,'linkexpiryinminutes' => linkexpiryinminutes,'maxresults' => max_results},
545
+ headers: request_headers.merge(custom_headers || {}),
546
+ base_url: request_url
547
+ }
548
+ promise = @client.make_request_async(:post, path_template, options)
549
+
550
+ promise = promise.then do |result|
551
+ http_response = result.response
552
+ status_code = http_response.status
553
+ response_content = http_response.body
554
+ unless status_code == 200
555
+ error_model = JSON.load(response_content)
556
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
557
+ end
558
+
559
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
560
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
561
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
562
+ # Deserialize Response
563
+ if status_code == 200
564
+ begin
565
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
566
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::FileListResult.mapper()
567
+ result.body = @client.deserialize(result_mapper, parsed_response)
568
+ rescue Exception => e
569
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
570
+ end
571
+ end
572
+
573
+ result
574
+ end
575
+
576
+ promise.execute
577
+ end
578
+
579
+ #
580
+ # Gets a list of currently existing nodes which were used for the Job
581
+ # execution. The returned information contains the node ID, its public IP and
582
+ # SSH port.
583
+ #
584
+ # @param resource_group_name [String] Name of the resource group to which the
585
+ # resource belongs.
586
+ # @param workspace_name [String] The name of the workspace. Workspace names can
587
+ # only contain a combination of alphanumeric characters along with dash (-) and
588
+ # underscore (_). The name must be from 1 through 64 characters long.
589
+ # @param experiment_name [String] The name of the experiment. Experiment names
590
+ # can only contain a combination of alphanumeric characters along with dash (-)
591
+ # and underscore (_). The name must be from 1 through 64 characters long.
592
+ # @param job_name [String] The name of the job within the specified resource
593
+ # group. Job names can only contain a combination of alphanumeric characters
594
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
595
+ # characters long.
596
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
597
+ # will be added to the HTTP request.
598
+ #
599
+ # @return [Array<RemoteLoginInformation>] operation results.
600
+ #
601
+ def list_remote_login_information(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
602
+ first_page = list_remote_login_information_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers)
603
+ first_page.get_all_items
604
+ end
605
+
606
+ #
607
+ # Gets a list of currently existing nodes which were used for the Job
608
+ # execution. The returned information contains the node ID, its public IP and
609
+ # SSH port.
610
+ #
611
+ # @param resource_group_name [String] Name of the resource group to which the
612
+ # resource belongs.
613
+ # @param workspace_name [String] The name of the workspace. Workspace names can
614
+ # only contain a combination of alphanumeric characters along with dash (-) and
615
+ # underscore (_). The name must be from 1 through 64 characters long.
616
+ # @param experiment_name [String] The name of the experiment. Experiment names
617
+ # can only contain a combination of alphanumeric characters along with dash (-)
618
+ # and underscore (_). The name must be from 1 through 64 characters long.
619
+ # @param job_name [String] The name of the job within the specified resource
620
+ # group. Job names can only contain a combination of alphanumeric characters
621
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
622
+ # characters long.
623
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
624
+ # will be added to the HTTP request.
625
+ #
626
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
627
+ #
628
+ def list_remote_login_information_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
629
+ list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
630
+ end
631
+
632
+ #
633
+ # Gets a list of currently existing nodes which were used for the Job
634
+ # execution. The returned information contains the node ID, its public IP and
635
+ # SSH port.
636
+ #
637
+ # @param resource_group_name [String] Name of the resource group to which the
638
+ # resource belongs.
639
+ # @param workspace_name [String] The name of the workspace. Workspace names can
640
+ # only contain a combination of alphanumeric characters along with dash (-) and
641
+ # underscore (_). The name must be from 1 through 64 characters long.
642
+ # @param experiment_name [String] The name of the experiment. Experiment names
643
+ # can only contain a combination of alphanumeric characters along with dash (-)
644
+ # and underscore (_). The name must be from 1 through 64 characters long.
645
+ # @param job_name [String] The name of the job within the specified resource
646
+ # group. Job names can only contain a combination of alphanumeric characters
647
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
648
+ # characters long.
649
+ # @param [Hash{String => String}] A hash of custom headers that will be added
650
+ # to the HTTP request.
651
+ #
652
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
653
+ #
654
+ def list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
655
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
656
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
657
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
658
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
659
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
660
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
661
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
662
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
663
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
664
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
665
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
666
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64
667
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1
668
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_name.match(Regexp.new('^^[-\w_]+$$')).nil?
669
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
670
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
671
+
672
+
673
+ request_headers = {}
674
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
675
+
676
+ # Set Headers
677
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
678
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
679
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/listRemoteLoginInformation'
680
+
681
+ request_url = @base_url || @client.base_url
682
+
683
+ options = {
684
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
685
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
686
+ query_params: {'api-version' => @client.api_version},
687
+ headers: request_headers.merge(custom_headers || {}),
688
+ base_url: request_url
689
+ }
690
+ promise = @client.make_request_async(:post, path_template, options)
691
+
692
+ promise = promise.then do |result|
693
+ http_response = result.response
694
+ status_code = http_response.status
695
+ response_content = http_response.body
696
+ unless status_code == 200
697
+ error_model = JSON.load(response_content)
698
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
699
+ end
700
+
701
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
702
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
703
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
704
+ # Deserialize Response
705
+ if status_code == 200
706
+ begin
707
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
708
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::RemoteLoginInformationListResult.mapper()
709
+ result.body = @client.deserialize(result_mapper, parsed_response)
710
+ rescue Exception => e
711
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
712
+ end
713
+ end
714
+
715
+ result
716
+ end
717
+
718
+ promise.execute
719
+ end
720
+
721
+ #
722
+ # Terminates a job.
723
+ #
724
+ # @param resource_group_name [String] Name of the resource group to which the
725
+ # resource belongs.
726
+ # @param workspace_name [String] The name of the workspace. Workspace names can
727
+ # only contain a combination of alphanumeric characters along with dash (-) and
728
+ # underscore (_). The name must be from 1 through 64 characters long.
729
+ # @param experiment_name [String] The name of the experiment. Experiment names
730
+ # can only contain a combination of alphanumeric characters along with dash (-)
731
+ # and underscore (_). The name must be from 1 through 64 characters long.
732
+ # @param job_name [String] The name of the job within the specified resource
733
+ # group. Job names can only contain a combination of alphanumeric characters
734
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
735
+ # characters long.
736
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
737
+ # will be added to the HTTP request.
738
+ #
739
+ def terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
740
+ response = terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
741
+ nil
742
+ end
743
+
744
+ #
745
+ # @param resource_group_name [String] Name of the resource group to which the
746
+ # resource belongs.
747
+ # @param workspace_name [String] The name of the workspace. Workspace names can
748
+ # only contain a combination of alphanumeric characters along with dash (-) and
749
+ # underscore (_). The name must be from 1 through 64 characters long.
750
+ # @param experiment_name [String] The name of the experiment. Experiment names
751
+ # can only contain a combination of alphanumeric characters along with dash (-)
752
+ # and underscore (_). The name must be from 1 through 64 characters long.
753
+ # @param job_name [String] The name of the job within the specified resource
754
+ # group. Job names can only contain a combination of alphanumeric characters
755
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
756
+ # characters long.
757
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
758
+ # will be added to the HTTP request.
759
+ #
760
+ # @return [Concurrent::Promise] promise which provides async access to http
761
+ # response.
762
+ #
763
+ def terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
764
+ # Send request
765
+ promise = begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers)
766
+
767
+ promise = promise.then do |response|
768
+ # Defining deserialization method.
769
+ deserialize_method = lambda do |parsed_response|
770
+ end
771
+
772
+ # Waiting for response.
773
+ @client.get_long_running_operation_result(response, deserialize_method)
774
+ end
775
+
776
+ promise
777
+ end
778
+
779
+ #
780
+ # Creates a Job in the given Experiment.
781
+ #
782
+ # @param resource_group_name [String] Name of the resource group to which the
783
+ # resource belongs.
784
+ # @param workspace_name [String] The name of the workspace. Workspace names can
785
+ # only contain a combination of alphanumeric characters along with dash (-) and
786
+ # underscore (_). The name must be from 1 through 64 characters long.
787
+ # @param experiment_name [String] The name of the experiment. Experiment names
788
+ # can only contain a combination of alphanumeric characters along with dash (-)
789
+ # and underscore (_). The name must be from 1 through 64 characters long.
790
+ # @param job_name [String] The name of the job within the specified resource
791
+ # group. Job names can only contain a combination of alphanumeric characters
792
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
793
+ # characters long.
794
+ # @param parameters [JobCreateParameters] The parameters to provide for job
795
+ # creation.
796
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
797
+ # will be added to the HTTP request.
798
+ #
799
+ # @return [Job] operation results.
800
+ #
801
+ def begin_create(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil)
802
+ response = begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers).value!
803
+ response.body unless response.nil?
804
+ end
805
+
806
+ #
807
+ # Creates a Job in the given Experiment.
808
+ #
809
+ # @param resource_group_name [String] Name of the resource group to which the
810
+ # resource belongs.
811
+ # @param workspace_name [String] The name of the workspace. Workspace names can
812
+ # only contain a combination of alphanumeric characters along with dash (-) and
813
+ # underscore (_). The name must be from 1 through 64 characters long.
814
+ # @param experiment_name [String] The name of the experiment. Experiment names
815
+ # can only contain a combination of alphanumeric characters along with dash (-)
816
+ # and underscore (_). The name must be from 1 through 64 characters long.
817
+ # @param job_name [String] The name of the job within the specified resource
818
+ # group. Job names can only contain a combination of alphanumeric characters
819
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
820
+ # characters long.
821
+ # @param parameters [JobCreateParameters] The parameters to provide for job
822
+ # creation.
823
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
824
+ # will be added to the HTTP request.
825
+ #
826
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
827
+ #
828
+ def begin_create_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil)
829
+ begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:custom_headers).value!
830
+ end
831
+
832
+ #
833
+ # Creates a Job in the given Experiment.
834
+ #
835
+ # @param resource_group_name [String] Name of the resource group to which the
836
+ # resource belongs.
837
+ # @param workspace_name [String] The name of the workspace. Workspace names can
838
+ # only contain a combination of alphanumeric characters along with dash (-) and
839
+ # underscore (_). The name must be from 1 through 64 characters long.
840
+ # @param experiment_name [String] The name of the experiment. Experiment names
841
+ # can only contain a combination of alphanumeric characters along with dash (-)
842
+ # and underscore (_). The name must be from 1 through 64 characters long.
843
+ # @param job_name [String] The name of the job within the specified resource
844
+ # group. Job names can only contain a combination of alphanumeric characters
845
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
846
+ # characters long.
847
+ # @param parameters [JobCreateParameters] The parameters to provide for job
848
+ # creation.
849
+ # @param [Hash{String => String}] A hash of custom headers that will be added
850
+ # to the HTTP request.
851
+ #
852
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
853
+ #
854
+ def begin_create_async(resource_group_name, workspace_name, experiment_name, job_name, parameters, custom_headers:nil)
855
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
856
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
857
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
858
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
859
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
860
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
861
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
862
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
863
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
864
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
865
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
866
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64
867
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1
868
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_name.match(Regexp.new('^^[-\w_]+$$')).nil?
869
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
870
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
871
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
872
+
873
+
874
+ request_headers = {}
875
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
876
+
877
+ # Set Headers
878
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
879
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
880
+
881
+ # Serialize Request
882
+ request_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::JobCreateParameters.mapper()
883
+ request_content = @client.serialize(request_mapper, parameters)
884
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
885
+
886
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}'
887
+
888
+ request_url = @base_url || @client.base_url
889
+
890
+ options = {
891
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
892
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
893
+ query_params: {'api-version' => @client.api_version},
894
+ body: request_content,
895
+ headers: request_headers.merge(custom_headers || {}),
896
+ base_url: request_url
897
+ }
898
+ promise = @client.make_request_async(:put, path_template, options)
899
+
900
+ promise = promise.then do |result|
901
+ http_response = result.response
902
+ status_code = http_response.status
903
+ response_content = http_response.body
904
+ unless status_code == 200 || status_code == 202
905
+ error_model = JSON.load(response_content)
906
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
907
+ end
908
+
909
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
910
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
911
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
912
+ # Deserialize Response
913
+ if status_code == 200
914
+ begin
915
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
916
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::Job.mapper()
917
+ result.body = @client.deserialize(result_mapper, parsed_response)
918
+ rescue Exception => e
919
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
920
+ end
921
+ end
922
+
923
+ result
924
+ end
925
+
926
+ promise.execute
927
+ end
928
+
929
+ #
930
+ # Deletes a Job.
931
+ #
932
+ # @param resource_group_name [String] Name of the resource group to which the
933
+ # resource belongs.
934
+ # @param workspace_name [String] The name of the workspace. Workspace names can
935
+ # only contain a combination of alphanumeric characters along with dash (-) and
936
+ # underscore (_). The name must be from 1 through 64 characters long.
937
+ # @param experiment_name [String] The name of the experiment. Experiment names
938
+ # can only contain a combination of alphanumeric characters along with dash (-)
939
+ # and underscore (_). The name must be from 1 through 64 characters long.
940
+ # @param job_name [String] The name of the job within the specified resource
941
+ # group. Job names can only contain a combination of alphanumeric characters
942
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
943
+ # characters long.
944
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
945
+ # will be added to the HTTP request.
946
+ #
947
+ #
948
+ def begin_delete(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
949
+ response = begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
950
+ nil
951
+ end
952
+
953
+ #
954
+ # Deletes a Job.
955
+ #
956
+ # @param resource_group_name [String] Name of the resource group to which the
957
+ # resource belongs.
958
+ # @param workspace_name [String] The name of the workspace. Workspace names can
959
+ # only contain a combination of alphanumeric characters along with dash (-) and
960
+ # underscore (_). The name must be from 1 through 64 characters long.
961
+ # @param experiment_name [String] The name of the experiment. Experiment names
962
+ # can only contain a combination of alphanumeric characters along with dash (-)
963
+ # and underscore (_). The name must be from 1 through 64 characters long.
964
+ # @param job_name [String] The name of the job within the specified resource
965
+ # group. Job names can only contain a combination of alphanumeric characters
966
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
967
+ # characters long.
968
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
969
+ # will be added to the HTTP request.
970
+ #
971
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
972
+ #
973
+ def begin_delete_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
974
+ begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
975
+ end
976
+
977
+ #
978
+ # Deletes a Job.
979
+ #
980
+ # @param resource_group_name [String] Name of the resource group to which the
981
+ # resource belongs.
982
+ # @param workspace_name [String] The name of the workspace. Workspace names can
983
+ # only contain a combination of alphanumeric characters along with dash (-) and
984
+ # underscore (_). The name must be from 1 through 64 characters long.
985
+ # @param experiment_name [String] The name of the experiment. Experiment names
986
+ # can only contain a combination of alphanumeric characters along with dash (-)
987
+ # and underscore (_). The name must be from 1 through 64 characters long.
988
+ # @param job_name [String] The name of the job within the specified resource
989
+ # group. Job names can only contain a combination of alphanumeric characters
990
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
991
+ # characters long.
992
+ # @param [Hash{String => String}] A hash of custom headers that will be added
993
+ # to the HTTP request.
994
+ #
995
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
996
+ #
997
+ def begin_delete_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
998
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
999
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
1000
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
1001
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
1002
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
1003
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
1004
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
1005
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
1006
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
1007
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
1008
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
1009
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64
1010
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1
1011
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_name.match(Regexp.new('^^[-\w_]+$$')).nil?
1012
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1013
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1014
+
1015
+
1016
+ request_headers = {}
1017
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1018
+
1019
+ # Set Headers
1020
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1021
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1022
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}'
1023
+
1024
+ request_url = @base_url || @client.base_url
1025
+
1026
+ options = {
1027
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1028
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
1029
+ query_params: {'api-version' => @client.api_version},
1030
+ headers: request_headers.merge(custom_headers || {}),
1031
+ base_url: request_url
1032
+ }
1033
+ promise = @client.make_request_async(:delete, path_template, options)
1034
+
1035
+ promise = promise.then do |result|
1036
+ http_response = result.response
1037
+ status_code = http_response.status
1038
+ response_content = http_response.body
1039
+ unless status_code == 200 || status_code == 202 || status_code == 204
1040
+ error_model = JSON.load(response_content)
1041
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1042
+ end
1043
+
1044
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1045
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1046
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1047
+
1048
+ result
1049
+ end
1050
+
1051
+ promise.execute
1052
+ end
1053
+
1054
+ #
1055
+ # Terminates a job.
1056
+ #
1057
+ # @param resource_group_name [String] Name of the resource group to which the
1058
+ # resource belongs.
1059
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1060
+ # only contain a combination of alphanumeric characters along with dash (-) and
1061
+ # underscore (_). The name must be from 1 through 64 characters long.
1062
+ # @param experiment_name [String] The name of the experiment. Experiment names
1063
+ # can only contain a combination of alphanumeric characters along with dash (-)
1064
+ # and underscore (_). The name must be from 1 through 64 characters long.
1065
+ # @param job_name [String] The name of the job within the specified resource
1066
+ # group. Job names can only contain a combination of alphanumeric characters
1067
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
1068
+ # characters long.
1069
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1070
+ # will be added to the HTTP request.
1071
+ #
1072
+ #
1073
+ def begin_terminate(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
1074
+ response = begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
1075
+ nil
1076
+ end
1077
+
1078
+ #
1079
+ # Terminates a job.
1080
+ #
1081
+ # @param resource_group_name [String] Name of the resource group to which the
1082
+ # resource belongs.
1083
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1084
+ # only contain a combination of alphanumeric characters along with dash (-) and
1085
+ # underscore (_). The name must be from 1 through 64 characters long.
1086
+ # @param experiment_name [String] The name of the experiment. Experiment names
1087
+ # can only contain a combination of alphanumeric characters along with dash (-)
1088
+ # and underscore (_). The name must be from 1 through 64 characters long.
1089
+ # @param job_name [String] The name of the job within the specified resource
1090
+ # group. Job names can only contain a combination of alphanumeric characters
1091
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
1092
+ # characters long.
1093
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1094
+ # will be added to the HTTP request.
1095
+ #
1096
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1097
+ #
1098
+ def begin_terminate_with_http_info(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
1099
+ begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
1100
+ end
1101
+
1102
+ #
1103
+ # Terminates a job.
1104
+ #
1105
+ # @param resource_group_name [String] Name of the resource group to which the
1106
+ # resource belongs.
1107
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1108
+ # only contain a combination of alphanumeric characters along with dash (-) and
1109
+ # underscore (_). The name must be from 1 through 64 characters long.
1110
+ # @param experiment_name [String] The name of the experiment. Experiment names
1111
+ # can only contain a combination of alphanumeric characters along with dash (-)
1112
+ # and underscore (_). The name must be from 1 through 64 characters long.
1113
+ # @param job_name [String] The name of the job within the specified resource
1114
+ # group. Job names can only contain a combination of alphanumeric characters
1115
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
1116
+ # characters long.
1117
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1118
+ # to the HTTP request.
1119
+ #
1120
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1121
+ #
1122
+ def begin_terminate_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
1123
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1124
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
1125
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
1126
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '64'" if !workspace_name.nil? && workspace_name.length > 64
1127
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
1128
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[-\w_]+$$')).nil?
1129
+ fail ArgumentError, 'experiment_name is nil' if experiment_name.nil?
1130
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MaxLength': '64'" if !experiment_name.nil? && experiment_name.length > 64
1131
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'MinLength': '1'" if !experiment_name.nil? && experiment_name.length < 1
1132
+ fail ArgumentError, "'experiment_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !experiment_name.nil? && experiment_name.match(Regexp.new('^^[-\w_]+$$')).nil?
1133
+ fail ArgumentError, 'job_name is nil' if job_name.nil?
1134
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MaxLength': '64'" if !job_name.nil? && job_name.length > 64
1135
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'MinLength': '1'" if !job_name.nil? && job_name.length < 1
1136
+ fail ArgumentError, "'job_name' should satisfy the constraint - 'Pattern': '^[-\w_]+$'" if !job_name.nil? && job_name.match(Regexp.new('^^[-\w_]+$$')).nil?
1137
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1138
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1139
+
1140
+
1141
+ request_headers = {}
1142
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1143
+
1144
+ # Set Headers
1145
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1146
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1147
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BatchAI/workspaces/{workspaceName}/experiments/{experimentName}/jobs/{jobName}/terminate'
1148
+
1149
+ request_url = @base_url || @client.base_url
1150
+
1151
+ options = {
1152
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1153
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'experimentName' => experiment_name,'jobName' => job_name,'subscriptionId' => @client.subscription_id},
1154
+ query_params: {'api-version' => @client.api_version},
1155
+ headers: request_headers.merge(custom_headers || {}),
1156
+ base_url: request_url
1157
+ }
1158
+ promise = @client.make_request_async(:post, path_template, options)
1159
+
1160
+ promise = promise.then do |result|
1161
+ http_response = result.response
1162
+ status_code = http_response.status
1163
+ response_content = http_response.body
1164
+ unless status_code == 200 || status_code == 202
1165
+ error_model = JSON.load(response_content)
1166
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1167
+ end
1168
+
1169
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1170
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1171
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1172
+
1173
+ result
1174
+ end
1175
+
1176
+ promise.execute
1177
+ end
1178
+
1179
+ #
1180
+ # Gets a list of Jobs within the specified Experiment.
1181
+ #
1182
+ # @param next_page_link [String] The NextLink from the previous successful call
1183
+ # to List operation.
1184
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1185
+ # will be added to the HTTP request.
1186
+ #
1187
+ # @return [JobListResult] operation results.
1188
+ #
1189
+ def list_by_experiment_next(next_page_link, custom_headers:nil)
1190
+ response = list_by_experiment_next_async(next_page_link, custom_headers:custom_headers).value!
1191
+ response.body unless response.nil?
1192
+ end
1193
+
1194
+ #
1195
+ # Gets a list of Jobs within the specified Experiment.
1196
+ #
1197
+ # @param next_page_link [String] The NextLink from the previous successful call
1198
+ # to List operation.
1199
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1200
+ # will be added to the HTTP request.
1201
+ #
1202
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1203
+ #
1204
+ def list_by_experiment_next_with_http_info(next_page_link, custom_headers:nil)
1205
+ list_by_experiment_next_async(next_page_link, custom_headers:custom_headers).value!
1206
+ end
1207
+
1208
+ #
1209
+ # Gets a list of Jobs within the specified Experiment.
1210
+ #
1211
+ # @param next_page_link [String] The NextLink from the previous successful call
1212
+ # to List operation.
1213
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1214
+ # to the HTTP request.
1215
+ #
1216
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1217
+ #
1218
+ def list_by_experiment_next_async(next_page_link, custom_headers:nil)
1219
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1220
+
1221
+
1222
+ request_headers = {}
1223
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1224
+
1225
+ # Set Headers
1226
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1227
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1228
+ path_template = '{nextLink}'
1229
+
1230
+ request_url = @base_url || @client.base_url
1231
+
1232
+ options = {
1233
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1234
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1235
+ headers: request_headers.merge(custom_headers || {}),
1236
+ base_url: request_url
1237
+ }
1238
+ promise = @client.make_request_async(:get, path_template, options)
1239
+
1240
+ promise = promise.then do |result|
1241
+ http_response = result.response
1242
+ status_code = http_response.status
1243
+ response_content = http_response.body
1244
+ unless status_code == 200
1245
+ error_model = JSON.load(response_content)
1246
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1247
+ end
1248
+
1249
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1250
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1251
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1252
+ # Deserialize Response
1253
+ if status_code == 200
1254
+ begin
1255
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1256
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::JobListResult.mapper()
1257
+ result.body = @client.deserialize(result_mapper, parsed_response)
1258
+ rescue Exception => e
1259
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1260
+ end
1261
+ end
1262
+
1263
+ result
1264
+ end
1265
+
1266
+ promise.execute
1267
+ end
1268
+
1269
+ #
1270
+ # List all directories and files inside the given directory of the Job's output
1271
+ # directory (if the output directory is on Azure File Share or Azure Storage
1272
+ # Container).
1273
+ #
1274
+ # @param next_page_link [String] The NextLink from the previous successful call
1275
+ # to List operation.
1276
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1277
+ # will be added to the HTTP request.
1278
+ #
1279
+ # @return [FileListResult] operation results.
1280
+ #
1281
+ def list_output_files_next(next_page_link, custom_headers:nil)
1282
+ response = list_output_files_next_async(next_page_link, custom_headers:custom_headers).value!
1283
+ response.body unless response.nil?
1284
+ end
1285
+
1286
+ #
1287
+ # List all directories and files inside the given directory of the Job's output
1288
+ # directory (if the output directory is on Azure File Share or Azure Storage
1289
+ # Container).
1290
+ #
1291
+ # @param next_page_link [String] The NextLink from the previous successful call
1292
+ # to List operation.
1293
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1294
+ # will be added to the HTTP request.
1295
+ #
1296
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1297
+ #
1298
+ def list_output_files_next_with_http_info(next_page_link, custom_headers:nil)
1299
+ list_output_files_next_async(next_page_link, custom_headers:custom_headers).value!
1300
+ end
1301
+
1302
+ #
1303
+ # List all directories and files inside the given directory of the Job's output
1304
+ # directory (if the output directory is on Azure File Share or Azure Storage
1305
+ # Container).
1306
+ #
1307
+ # @param next_page_link [String] The NextLink from the previous successful call
1308
+ # to List operation.
1309
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1310
+ # to the HTTP request.
1311
+ #
1312
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1313
+ #
1314
+ def list_output_files_next_async(next_page_link, custom_headers:nil)
1315
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1316
+
1317
+
1318
+ request_headers = {}
1319
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1320
+
1321
+ # Set Headers
1322
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1323
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1324
+ path_template = '{nextLink}'
1325
+
1326
+ request_url = @base_url || @client.base_url
1327
+
1328
+ options = {
1329
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1330
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1331
+ headers: request_headers.merge(custom_headers || {}),
1332
+ base_url: request_url
1333
+ }
1334
+ promise = @client.make_request_async(:post, path_template, options)
1335
+
1336
+ promise = promise.then do |result|
1337
+ http_response = result.response
1338
+ status_code = http_response.status
1339
+ response_content = http_response.body
1340
+ unless status_code == 200
1341
+ error_model = JSON.load(response_content)
1342
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1343
+ end
1344
+
1345
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1346
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1347
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1348
+ # Deserialize Response
1349
+ if status_code == 200
1350
+ begin
1351
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1352
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::FileListResult.mapper()
1353
+ result.body = @client.deserialize(result_mapper, parsed_response)
1354
+ rescue Exception => e
1355
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1356
+ end
1357
+ end
1358
+
1359
+ result
1360
+ end
1361
+
1362
+ promise.execute
1363
+ end
1364
+
1365
+ #
1366
+ # Gets a list of currently existing nodes which were used for the Job
1367
+ # execution. The returned information contains the node ID, its public IP and
1368
+ # SSH port.
1369
+ #
1370
+ # @param next_page_link [String] The NextLink from the previous successful call
1371
+ # to List operation.
1372
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1373
+ # will be added to the HTTP request.
1374
+ #
1375
+ # @return [RemoteLoginInformationListResult] operation results.
1376
+ #
1377
+ def list_remote_login_information_next(next_page_link, custom_headers:nil)
1378
+ response = list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value!
1379
+ response.body unless response.nil?
1380
+ end
1381
+
1382
+ #
1383
+ # Gets a list of currently existing nodes which were used for the Job
1384
+ # execution. The returned information contains the node ID, its public IP and
1385
+ # SSH port.
1386
+ #
1387
+ # @param next_page_link [String] The NextLink from the previous successful call
1388
+ # to List operation.
1389
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1390
+ # will be added to the HTTP request.
1391
+ #
1392
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1393
+ #
1394
+ def list_remote_login_information_next_with_http_info(next_page_link, custom_headers:nil)
1395
+ list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers).value!
1396
+ end
1397
+
1398
+ #
1399
+ # Gets a list of currently existing nodes which were used for the Job
1400
+ # execution. The returned information contains the node ID, its public IP and
1401
+ # SSH port.
1402
+ #
1403
+ # @param next_page_link [String] The NextLink from the previous successful call
1404
+ # to List operation.
1405
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1406
+ # to the HTTP request.
1407
+ #
1408
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1409
+ #
1410
+ def list_remote_login_information_next_async(next_page_link, custom_headers:nil)
1411
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1412
+
1413
+
1414
+ request_headers = {}
1415
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1416
+
1417
+ # Set Headers
1418
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1419
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1420
+ path_template = '{nextLink}'
1421
+
1422
+ request_url = @base_url || @client.base_url
1423
+
1424
+ options = {
1425
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1426
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1427
+ headers: request_headers.merge(custom_headers || {}),
1428
+ base_url: request_url
1429
+ }
1430
+ promise = @client.make_request_async(:post, path_template, options)
1431
+
1432
+ promise = promise.then do |result|
1433
+ http_response = result.response
1434
+ status_code = http_response.status
1435
+ response_content = http_response.body
1436
+ unless status_code == 200
1437
+ error_model = JSON.load(response_content)
1438
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1439
+ end
1440
+
1441
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1442
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1443
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1444
+ # Deserialize Response
1445
+ if status_code == 200
1446
+ begin
1447
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1448
+ result_mapper = Azure::BatchAI::Mgmt::V2018_05_01::Models::RemoteLoginInformationListResult.mapper()
1449
+ result.body = @client.deserialize(result_mapper, parsed_response)
1450
+ rescue Exception => e
1451
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1452
+ end
1453
+ end
1454
+
1455
+ result
1456
+ end
1457
+
1458
+ promise.execute
1459
+ end
1460
+
1461
+ #
1462
+ # Gets a list of Jobs within the specified Experiment.
1463
+ #
1464
+ # @param resource_group_name [String] Name of the resource group to which the
1465
+ # resource belongs.
1466
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1467
+ # only contain a combination of alphanumeric characters along with dash (-) and
1468
+ # underscore (_). The name must be from 1 through 64 characters long.
1469
+ # @param experiment_name [String] The name of the experiment. Experiment names
1470
+ # can only contain a combination of alphanumeric characters along with dash (-)
1471
+ # and underscore (_). The name must be from 1 through 64 characters long.
1472
+ # @param jobs_list_by_experiment_options [JobsListByExperimentOptions]
1473
+ # Additional parameters for the operation
1474
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1475
+ # will be added to the HTTP request.
1476
+ #
1477
+ # @return [JobListResult] which provide lazy access to pages of the response.
1478
+ #
1479
+ def list_by_experiment_as_lazy(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:nil, custom_headers:nil)
1480
+ response = list_by_experiment_async(resource_group_name, workspace_name, experiment_name, jobs_list_by_experiment_options:jobs_list_by_experiment_options, custom_headers:custom_headers).value!
1481
+ unless response.nil?
1482
+ page = response.body
1483
+ page.next_method = Proc.new do |next_page_link|
1484
+ list_by_experiment_next_async(next_page_link, custom_headers:custom_headers)
1485
+ end
1486
+ page
1487
+ end
1488
+ end
1489
+
1490
+ #
1491
+ # List all directories and files inside the given directory of the Job's output
1492
+ # directory (if the output directory is on Azure File Share or Azure Storage
1493
+ # Container).
1494
+ #
1495
+ # @param resource_group_name [String] Name of the resource group to which the
1496
+ # resource belongs.
1497
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1498
+ # only contain a combination of alphanumeric characters along with dash (-) and
1499
+ # underscore (_). The name must be from 1 through 64 characters long.
1500
+ # @param experiment_name [String] The name of the experiment. Experiment names
1501
+ # can only contain a combination of alphanumeric characters along with dash (-)
1502
+ # and underscore (_). The name must be from 1 through 64 characters long.
1503
+ # @param job_name [String] The name of the job within the specified resource
1504
+ # group. Job names can only contain a combination of alphanumeric characters
1505
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
1506
+ # characters long.
1507
+ # @param jobs_list_output_files_options [JobsListOutputFilesOptions] Additional
1508
+ # parameters for the operation
1509
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1510
+ # will be added to the HTTP request.
1511
+ #
1512
+ # @return [FileListResult] which provide lazy access to pages of the response.
1513
+ #
1514
+ def list_output_files_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:nil)
1515
+ response = list_output_files_async(resource_group_name, workspace_name, experiment_name, job_name, jobs_list_output_files_options, custom_headers:custom_headers).value!
1516
+ unless response.nil?
1517
+ page = response.body
1518
+ page.next_method = Proc.new do |next_page_link|
1519
+ list_output_files_next_async(next_page_link, custom_headers:custom_headers)
1520
+ end
1521
+ page
1522
+ end
1523
+ end
1524
+
1525
+ #
1526
+ # Gets a list of currently existing nodes which were used for the Job
1527
+ # execution. The returned information contains the node ID, its public IP and
1528
+ # SSH port.
1529
+ #
1530
+ # @param resource_group_name [String] Name of the resource group to which the
1531
+ # resource belongs.
1532
+ # @param workspace_name [String] The name of the workspace. Workspace names can
1533
+ # only contain a combination of alphanumeric characters along with dash (-) and
1534
+ # underscore (_). The name must be from 1 through 64 characters long.
1535
+ # @param experiment_name [String] The name of the experiment. Experiment names
1536
+ # can only contain a combination of alphanumeric characters along with dash (-)
1537
+ # and underscore (_). The name must be from 1 through 64 characters long.
1538
+ # @param job_name [String] The name of the job within the specified resource
1539
+ # group. Job names can only contain a combination of alphanumeric characters
1540
+ # along with dash (-) and underscore (_). The name must be from 1 through 64
1541
+ # characters long.
1542
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1543
+ # will be added to the HTTP request.
1544
+ #
1545
+ # @return [RemoteLoginInformationListResult] which provide lazy access to pages
1546
+ # of the response.
1547
+ #
1548
+ def list_remote_login_information_as_lazy(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:nil)
1549
+ response = list_remote_login_information_async(resource_group_name, workspace_name, experiment_name, job_name, custom_headers:custom_headers).value!
1550
+ unless response.nil?
1551
+ page = response.body
1552
+ page.next_method = Proc.new do |next_page_link|
1553
+ list_remote_login_information_next_async(next_page_link, custom_headers:custom_headers)
1554
+ end
1555
+ page
1556
+ end
1557
+ end
1558
+
1559
+ end
1560
+ end