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