azure_mgmt_machine_learning_services 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb +14 -0
  3. data/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/machine_learning_services_client.rb +1 -1
  4. data/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/operations.rb +2 -0
  5. data/lib/2018-03-01-preview/generated/azure_mgmt_machine_learning_services/workspaces.rb +20 -0
  6. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services.rb +91 -0
  7. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb +1170 -0
  8. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/machine_learning_services_client.rb +147 -0
  9. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aks.rb +140 -0
  10. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aks_compute_secrets.rb +85 -0
  11. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aks_networking_configuration.rb +94 -0
  12. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aksproperties.rb +117 -0
  13. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/allocation_state.rb +16 -0
  14. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute.rb +140 -0
  15. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute_node_information.rb +71 -0
  16. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute_nodes_information.rb +106 -0
  17. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute_properties.rb +194 -0
  18. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/cluster_update_parameters.rb +48 -0
  19. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute.rb +160 -0
  20. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_nodes_information.rb +59 -0
  21. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_resource.rb +110 -0
  22. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_secrets.rb +49 -0
  23. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_type.rb +21 -0
  24. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/data_factory.rb +128 -0
  25. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/data_lake_analytics.rb +140 -0
  26. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/data_lake_analytics_properties.rb +47 -0
  27. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/databricks.rb +140 -0
  28. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/databricks_compute_secrets.rb +61 -0
  29. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/databricks_properties.rb +47 -0
  30. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/error_detail.rb +57 -0
  31. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/error_response.rb +80 -0
  32. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/hdinsight.rb +140 -0
  33. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/hdinsight_properties.rb +72 -0
  34. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/identity.rb +72 -0
  35. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/list_usages_result.rb +102 -0
  36. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/list_workspace_keys_result.rb +85 -0
  37. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/machine_learning_service_error.rb +48 -0
  38. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/node_state_counts.rb +113 -0
  39. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/operation.rb +58 -0
  40. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/operation_display.rb +80 -0
  41. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/operation_list_result.rb +56 -0
  42. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/paginated_compute_resources_list.rb +101 -0
  43. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/password.rb +60 -0
  44. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/provisioning_state.rb +21 -0
  45. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/registry_list_credentials_result.rb +80 -0
  46. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/resource.rb +124 -0
  47. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/resource_id.rb +47 -0
  48. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/resource_identity_type.rb +15 -0
  49. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/scale_settings.rb +69 -0
  50. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/service_principal_credentials.rb +57 -0
  51. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/ssl_configuration.rb +80 -0
  52. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/system_service.rb +71 -0
  53. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/underlying_resource_action.rb +16 -0
  54. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/usage.rb +85 -0
  55. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/usage_name.rb +59 -0
  56. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/usage_unit.rb +15 -0
  57. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/user_account_credentials.rb +71 -0
  58. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine.rb +140 -0
  59. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_properties.rb +82 -0
  60. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_secrets.rb +63 -0
  61. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_size.rb +139 -0
  62. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_size_list_result.rb +56 -0
  63. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_ssh_credentials.rb +79 -0
  64. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/vm_priority.rb +16 -0
  65. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/workspace.rb +220 -0
  66. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/workspace_list_result.rb +101 -0
  67. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/models/workspace_update_parameters.rb +77 -0
  68. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/module_definition.rb +9 -0
  69. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/operations.rb +113 -0
  70. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/usages.rb +235 -0
  71. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/virtual_machine_sizes.rb +120 -0
  72. data/lib/2018-11-19/generated/azure_mgmt_machine_learning_services/workspaces.rb +1053 -0
  73. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services.rb +91 -0
  74. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb +1052 -0
  75. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/machine_learning_services_client.rb +147 -0
  76. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aks.rb +140 -0
  77. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aks_compute_secrets.rb +85 -0
  78. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aks_networking_configuration.rb +94 -0
  79. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aksproperties.rb +117 -0
  80. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/allocation_state.rb +16 -0
  81. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aml_compute.rb +140 -0
  82. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aml_compute_node_information.rb +71 -0
  83. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aml_compute_nodes_information.rb +81 -0
  84. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/aml_compute_properties.rb +194 -0
  85. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/cluster_update_parameters.rb +48 -0
  86. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/compute.rb +160 -0
  87. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/compute_nodes_information.rb +59 -0
  88. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/compute_resource.rb +110 -0
  89. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/compute_secrets.rb +49 -0
  90. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/compute_type.rb +21 -0
  91. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/data_factory.rb +128 -0
  92. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/data_lake_analytics.rb +140 -0
  93. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/data_lake_analytics_properties.rb +47 -0
  94. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/databricks.rb +140 -0
  95. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/databricks_compute_secrets.rb +61 -0
  96. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/databricks_properties.rb +47 -0
  97. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/error_detail.rb +57 -0
  98. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/error_response.rb +80 -0
  99. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/hdinsight.rb +140 -0
  100. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/hdinsight_properties.rb +72 -0
  101. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/identity.rb +72 -0
  102. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/list_usages_result.rb +102 -0
  103. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/list_workspace_keys_result.rb +85 -0
  104. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/machine_learning_service_error.rb +48 -0
  105. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/node_state_counts.rb +113 -0
  106. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/operation.rb +58 -0
  107. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/operation_display.rb +80 -0
  108. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/operation_list_result.rb +56 -0
  109. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/paginated_compute_resources_list.rb +101 -0
  110. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/password.rb +60 -0
  111. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/provisioning_state.rb +21 -0
  112. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/registry_list_credentials_result.rb +80 -0
  113. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/resource.rb +124 -0
  114. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/resource_id.rb +47 -0
  115. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/resource_identity_type.rb +15 -0
  116. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/scale_settings.rb +69 -0
  117. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/service_principal_credentials.rb +57 -0
  118. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/ssl_configuration.rb +80 -0
  119. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/system_service.rb +71 -0
  120. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/underlying_resource_action.rb +16 -0
  121. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/usage.rb +109 -0
  122. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/usage_name.rb +59 -0
  123. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/usage_unit.rb +15 -0
  124. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/user_account_credentials.rb +71 -0
  125. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/virtual_machine.rb +140 -0
  126. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/virtual_machine_properties.rb +82 -0
  127. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/virtual_machine_secrets.rb +63 -0
  128. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/virtual_machine_size.rb +139 -0
  129. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/virtual_machine_size_list_result.rb +56 -0
  130. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/virtual_machine_ssh_credentials.rb +79 -0
  131. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/vm_priority.rb +16 -0
  132. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/workspace.rb +220 -0
  133. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/workspace_list_result.rb +101 -0
  134. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/models/workspace_update_parameters.rb +77 -0
  135. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/module_definition.rb +9 -0
  136. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/operations.rb +113 -0
  137. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/usages.rb +235 -0
  138. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/virtual_machine_sizes.rb +120 -0
  139. data/lib/2019-05-01/generated/azure_mgmt_machine_learning_services/workspaces.rb +1053 -0
  140. data/lib/azure_mgmt_machine_learning_services.rb +2 -0
  141. data/lib/profiles/latest/modules/machinelearningservices_profile_module.rb +189 -97
  142. data/lib/version.rb +1 -1
  143. metadata +138 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb8fdce6e61191b08d6417199b134189ea471278431c74748e7b5ab9f03c0c0e
4
- data.tar.gz: eb358a9f6e3aacfcad0ea5475b9abf8953cc38fd45d191260d99640d6e6d6d12
3
+ metadata.gz: b01fe6a76094b71cdd82263c2e84e811007ff436accc2a9004f0c3f12dae9be8
4
+ data.tar.gz: 1285ee1c1eee6ef2ba1574b509d4b0e46480e2719c1e4a1b84410138bb08d022
5
5
  SHA512:
6
- metadata.gz: a4d5676f0ec03e51b09aaf1e8583165f689c5f78052db8b27d2dc0efa81c0946fed16979401917b2c5f459c4507e9f8ca874b453ed714c5958f3f320f6a67bc4
7
- data.tar.gz: 58a3c08242a4c02735f799e7bc901f3dd64b6427d619b09c1ad162bf7818b18eb324656411bf3593987f2f154a4b79d7a39133c6d77f2f415ad32433f8773cc5
6
+ metadata.gz: a376eb331831aada8453a7bb7d6ebbaea0a1984218e2812b3886f6ade2402dda8582badf048fae48adf941a7f2dbc7480de3154fee544a0ab7237c389e89cbf8
7
+ data.tar.gz: a3ad122bf88775f5aafe1dc43d92ca929b6df59007713e1270f8facf5c3a0282388f2e02963a44ae3714e59d4bbc0e778e633b37cff8985d70adbb54d66e4610
@@ -103,6 +103,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
103
103
  end
104
104
 
105
105
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
106
108
  # Deserialize Response
107
109
  if status_code == 200
108
110
  begin
@@ -205,6 +207,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
205
207
  end
206
208
 
207
209
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
210
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
211
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
208
212
  # Deserialize Response
209
213
  if status_code == 200
210
214
  begin
@@ -443,6 +447,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
443
447
  end
444
448
 
445
449
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
450
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
451
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
446
452
  # Deserialize Response
447
453
  if status_code == 200
448
454
  begin
@@ -562,6 +568,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
562
568
  end
563
569
 
564
570
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
571
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
572
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
565
573
  # Deserialize Response
566
574
  if status_code == 200
567
575
  begin
@@ -670,6 +678,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
670
678
  end
671
679
 
672
680
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
681
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
682
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
673
683
 
674
684
  result
675
685
  end
@@ -758,6 +768,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
758
768
  end
759
769
 
760
770
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
771
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
772
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
761
773
 
762
774
  result
763
775
  end
@@ -836,6 +848,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
836
848
  end
837
849
 
838
850
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
851
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
852
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
839
853
  # Deserialize Response
840
854
  if status_code == 200
841
855
  begin
@@ -132,7 +132,7 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
132
132
  #
133
133
  def add_telemetry
134
134
  sdk_information = 'azure_mgmt_machine_learning_services'
135
- sdk_information = "#{sdk_information}/0.17.1"
135
+ sdk_information = "#{sdk_information}/0.17.2"
136
136
  add_user_agent_information(sdk_information)
137
137
  end
138
138
  end
@@ -90,6 +90,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
90
90
  end
91
91
 
92
92
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
93
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
94
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
93
95
  # Deserialize Response
94
96
  if status_code == 200
95
97
  begin
@@ -100,6 +100,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
100
100
  end
101
101
 
102
102
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
103
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
104
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
103
105
  # Deserialize Response
104
106
  if status_code == 200
105
107
  begin
@@ -209,6 +211,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
209
211
  end
210
212
 
211
213
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
214
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
215
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
212
216
  # Deserialize Response
213
217
  if status_code == 200
214
218
  begin
@@ -313,6 +317,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
313
317
  end
314
318
 
315
319
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
320
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
321
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
316
322
 
317
323
  result
318
324
  end
@@ -412,6 +418,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
412
418
  end
413
419
 
414
420
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
421
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
422
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
415
423
  # Deserialize Response
416
424
  if status_code == 200
417
425
  begin
@@ -509,6 +517,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
509
517
  end
510
518
 
511
519
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
520
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
521
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
512
522
  # Deserialize Response
513
523
  if status_code == 200
514
524
  begin
@@ -607,6 +617,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
607
617
  end
608
618
 
609
619
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
620
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
621
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
610
622
  # Deserialize Response
611
623
  if status_code == 200
612
624
  begin
@@ -704,6 +716,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
704
716
  end
705
717
 
706
718
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
719
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
720
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
707
721
 
708
722
  result
709
723
  end
@@ -784,6 +798,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
784
798
  end
785
799
 
786
800
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
801
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
802
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
787
803
  # Deserialize Response
788
804
  if status_code == 200
789
805
  begin
@@ -875,6 +891,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
875
891
  end
876
892
 
877
893
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
894
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
895
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
878
896
  # Deserialize Response
879
897
  if status_code == 200
880
898
  begin
@@ -966,6 +984,8 @@ module Azure::MachineLearningServices::Mgmt::V2018_03_01_preview
966
984
  end
967
985
 
968
986
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
987
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
988
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
969
989
  # Deserialize Response
970
990
  if status_code == 200
971
991
  begin
@@ -0,0 +1,91 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2018-11-19/generated/azure_mgmt_machine_learning_services/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::MachineLearningServices::Mgmt::V2018_11_19
23
+ autoload :Operations, '2018-11-19/generated/azure_mgmt_machine_learning_services/operations.rb'
24
+ autoload :Workspaces, '2018-11-19/generated/azure_mgmt_machine_learning_services/workspaces.rb'
25
+ autoload :Usages, '2018-11-19/generated/azure_mgmt_machine_learning_services/usages.rb'
26
+ autoload :VirtualMachineSizes, '2018-11-19/generated/azure_mgmt_machine_learning_services/virtual_machine_sizes.rb'
27
+ autoload :MachineLearningCompute, '2018-11-19/generated/azure_mgmt_machine_learning_services/machine_learning_compute.rb'
28
+ autoload :MachineLearningServicesClient, '2018-11-19/generated/azure_mgmt_machine_learning_services/machine_learning_services_client.rb'
29
+
30
+ module Models
31
+ autoload :AKSProperties, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aksproperties.rb'
32
+ autoload :OperationDisplay, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/operation_display.rb'
33
+ autoload :DataLakeAnalyticsProperties, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/data_lake_analytics_properties.rb'
34
+ autoload :OperationListResult, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/operation_list_result.rb'
35
+ autoload :PaginatedComputeResourcesList, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/paginated_compute_resources_list.rb'
36
+ autoload :WorkspaceUpdateParameters, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/workspace_update_parameters.rb'
37
+ autoload :SystemService, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/system_service.rb'
38
+ autoload :Usage, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/usage.rb'
39
+ autoload :SslConfiguration, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/ssl_configuration.rb'
40
+ autoload :VirtualMachineSize, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_size.rb'
41
+ autoload :AksNetworkingConfiguration, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aks_networking_configuration.rb'
42
+ autoload :WorkspaceListResult, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/workspace_list_result.rb'
43
+ autoload :Operation, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/operation.rb'
44
+ autoload :Resource, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/resource.rb'
45
+ autoload :Password, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/password.rb'
46
+ autoload :ScaleSettings, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/scale_settings.rb'
47
+ autoload :ListWorkspaceKeysResult, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/list_workspace_keys_result.rb'
48
+ autoload :UserAccountCredentials, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/user_account_credentials.rb'
49
+ autoload :ErrorResponse, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/error_response.rb'
50
+ autoload :NodeStateCounts, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/node_state_counts.rb'
51
+ autoload :Compute, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute.rb'
52
+ autoload :AmlComputeProperties, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute_properties.rb'
53
+ autoload :UsageName, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/usage_name.rb'
54
+ autoload :ComputeSecrets, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_secrets.rb'
55
+ autoload :VirtualMachineSizeListResult, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_size_list_result.rb'
56
+ autoload :VirtualMachineSshCredentials, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_ssh_credentials.rb'
57
+ autoload :ResourceId, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/resource_id.rb'
58
+ autoload :VirtualMachineProperties, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_properties.rb'
59
+ autoload :ErrorDetail, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/error_detail.rb'
60
+ autoload :AmlComputeNodeInformation, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute_node_information.rb'
61
+ autoload :ServicePrincipalCredentials, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/service_principal_credentials.rb'
62
+ autoload :ListUsagesResult, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/list_usages_result.rb'
63
+ autoload :HDInsightProperties, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/hdinsight_properties.rb'
64
+ autoload :RegistryListCredentialsResult, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/registry_list_credentials_result.rb'
65
+ autoload :ComputeNodesInformation, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_nodes_information.rb'
66
+ autoload :Identity, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/identity.rb'
67
+ autoload :ClusterUpdateParameters, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/cluster_update_parameters.rb'
68
+ autoload :MachineLearningServiceError, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/machine_learning_service_error.rb'
69
+ autoload :DatabricksProperties, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/databricks_properties.rb'
70
+ autoload :Workspace, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/workspace.rb'
71
+ autoload :ComputeResource, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_resource.rb'
72
+ autoload :AKS, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aks.rb'
73
+ autoload :AmlCompute, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute.rb'
74
+ autoload :VirtualMachine, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine.rb'
75
+ autoload :HDInsight, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/hdinsight.rb'
76
+ autoload :DataFactory, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/data_factory.rb'
77
+ autoload :Databricks, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/databricks.rb'
78
+ autoload :DataLakeAnalytics, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/data_lake_analytics.rb'
79
+ autoload :AmlComputeNodesInformation, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aml_compute_nodes_information.rb'
80
+ autoload :AksComputeSecrets, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/aks_compute_secrets.rb'
81
+ autoload :VirtualMachineSecrets, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/virtual_machine_secrets.rb'
82
+ autoload :DatabricksComputeSecrets, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/databricks_compute_secrets.rb'
83
+ autoload :ProvisioningState, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/provisioning_state.rb'
84
+ autoload :UsageUnit, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/usage_unit.rb'
85
+ autoload :ResourceIdentityType, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/resource_identity_type.rb'
86
+ autoload :VmPriority, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/vm_priority.rb'
87
+ autoload :AllocationState, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/allocation_state.rb'
88
+ autoload :ComputeType, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/compute_type.rb'
89
+ autoload :UnderlyingResourceAction, '2018-11-19/generated/azure_mgmt_machine_learning_services/models/underlying_resource_action.rb'
90
+ end
91
+ end
@@ -0,0 +1,1170 @@
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::MachineLearningServices::Mgmt::V2018_11_19
7
+ #
8
+ # These APIs allow end users to operate on Azure Machine Learning Workspace
9
+ # resources.
10
+ #
11
+ class MachineLearningCompute
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the MachineLearningCompute class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [MachineLearningServicesClient] reference to the MachineLearningServicesClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Gets computes in specified workspace.
27
+ #
28
+ # @param resource_group_name [String] Name of the resource group in which
29
+ # workspace is located.
30
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
31
+ # @param skiptoken [String] Continuation token for pagination.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [Array<ComputeResource>] operation results.
36
+ #
37
+ def list_by_workspace(resource_group_name, workspace_name, skiptoken:nil, custom_headers:nil)
38
+ first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, skiptoken:skiptoken, custom_headers:custom_headers)
39
+ first_page.get_all_items
40
+ end
41
+
42
+ #
43
+ # Gets computes in specified workspace.
44
+ #
45
+ # @param resource_group_name [String] Name of the resource group in which
46
+ # workspace is located.
47
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
48
+ # @param skiptoken [String] Continuation token for pagination.
49
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
50
+ # will be added to the HTTP request.
51
+ #
52
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
53
+ #
54
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, skiptoken:nil, custom_headers:nil)
55
+ list_by_workspace_async(resource_group_name, workspace_name, skiptoken:skiptoken, custom_headers:custom_headers).value!
56
+ end
57
+
58
+ #
59
+ # Gets computes in specified workspace.
60
+ #
61
+ # @param resource_group_name [String] Name of the resource group in which
62
+ # workspace is located.
63
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
64
+ # @param skiptoken [String] Continuation token for pagination.
65
+ # @param [Hash{String => String}] A hash of custom headers that will be added
66
+ # to the HTTP request.
67
+ #
68
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
69
+ #
70
+ def list_by_workspace_async(resource_group_name, workspace_name, skiptoken:nil, custom_headers:nil)
71
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
72
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'
84
+
85
+ request_url = @base_url || @client.base_url
86
+
87
+ options = {
88
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
89
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
90
+ query_params: {'api-version' => @client.api_version,'$skiptoken' => skiptoken},
91
+ headers: request_headers.merge(custom_headers || {}),
92
+ base_url: request_url
93
+ }
94
+ promise = @client.make_request_async(:get, path_template, options)
95
+
96
+ promise = promise.then do |result|
97
+ http_response = result.response
98
+ status_code = http_response.status
99
+ response_content = http_response.body
100
+ unless status_code == 200
101
+ error_model = JSON.load(response_content)
102
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
103
+ end
104
+
105
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
106
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
107
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::PaginatedComputeResourcesList.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Gets compute definition by its name. Any secrets (storage keys, service
127
+ # credentials, etc) are not returned - use 'keys' nested resource to get them.
128
+ #
129
+ # @param resource_group_name [String] Name of the resource group in which
130
+ # workspace is located.
131
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
132
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
133
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
134
+ # will be added to the HTTP request.
135
+ #
136
+ # @return [ComputeResource] operation results.
137
+ #
138
+ def get(resource_group_name, workspace_name, compute_name, custom_headers:nil)
139
+ response = get_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
140
+ response.body unless response.nil?
141
+ end
142
+
143
+ #
144
+ # Gets compute definition by its name. Any secrets (storage keys, service
145
+ # credentials, etc) are not returned - use 'keys' nested resource to get them.
146
+ #
147
+ # @param resource_group_name [String] Name of the resource group in which
148
+ # workspace is located.
149
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
150
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
151
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
152
+ # will be added to the HTTP request.
153
+ #
154
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
155
+ #
156
+ def get_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil)
157
+ get_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
158
+ end
159
+
160
+ #
161
+ # Gets compute definition by its name. Any secrets (storage keys, service
162
+ # credentials, etc) are not returned - use 'keys' nested resource to get them.
163
+ #
164
+ # @param resource_group_name [String] Name of the resource group in which
165
+ # workspace is located.
166
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
167
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
168
+ # @param [Hash{String => String}] A hash of custom headers that will be added
169
+ # to the HTTP request.
170
+ #
171
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
172
+ #
173
+ def get_async(resource_group_name, workspace_name, compute_name, custom_headers:nil)
174
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
175
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
176
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
177
+ fail ArgumentError, 'compute_name is nil' if compute_name.nil?
178
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
179
+
180
+
181
+ request_headers = {}
182
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
183
+
184
+ # Set Headers
185
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
186
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
187
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'
188
+
189
+ request_url = @base_url || @client.base_url
190
+
191
+ options = {
192
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
193
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'computeName' => compute_name},
194
+ query_params: {'api-version' => @client.api_version},
195
+ headers: request_headers.merge(custom_headers || {}),
196
+ base_url: request_url
197
+ }
198
+ promise = @client.make_request_async(:get, path_template, options)
199
+
200
+ promise = promise.then do |result|
201
+ http_response = result.response
202
+ status_code = http_response.status
203
+ response_content = http_response.body
204
+ unless status_code == 200
205
+ error_model = JSON.load(response_content)
206
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
207
+ end
208
+
209
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
210
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
211
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
212
+ # Deserialize Response
213
+ if status_code == 200
214
+ begin
215
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
216
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
217
+ result.body = @client.deserialize(result_mapper, parsed_response)
218
+ rescue Exception => e
219
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
220
+ end
221
+ end
222
+
223
+ result
224
+ end
225
+
226
+ promise.execute
227
+ end
228
+
229
+ #
230
+ # Creates or updates compute. This call will overwrite a compute if it exists.
231
+ # This is a nonrecoverable operation. If your intent is to create a new
232
+ # compute, do a GET first to verify that it does not exist yet.
233
+ #
234
+ # @param resource_group_name [String] Name of the resource group in which
235
+ # workspace is located.
236
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
237
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
238
+ # @param parameters [ComputeResource] Payload with Machine Learning compute
239
+ # definition.
240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
+ # will be added to the HTTP request.
242
+ #
243
+ # @return [ComputeResource] operation results.
244
+ #
245
+ def create_or_update(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
246
+ response = create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers).value!
247
+ response.body unless response.nil?
248
+ end
249
+
250
+ #
251
+ # @param resource_group_name [String] Name of the resource group in which
252
+ # workspace is located.
253
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
254
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
255
+ # @param parameters [ComputeResource] Payload with Machine Learning compute
256
+ # definition.
257
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
258
+ # will be added to the HTTP request.
259
+ #
260
+ # @return [Concurrent::Promise] promise which provides async access to http
261
+ # response.
262
+ #
263
+ def create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
264
+ # Send request
265
+ promise = begin_create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers)
266
+
267
+ promise = promise.then do |response|
268
+ # Defining deserialization method.
269
+ deserialize_method = lambda do |parsed_response|
270
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
271
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
272
+ end
273
+
274
+ # Waiting for response.
275
+ @client.get_long_running_operation_result(response, deserialize_method)
276
+ end
277
+
278
+ promise
279
+ end
280
+
281
+ #
282
+ # Updates properties of a compute. This call will overwrite a compute if it
283
+ # exists. This is a nonrecoverable operation.
284
+ #
285
+ # @param resource_group_name [String] Name of the resource group in which
286
+ # workspace is located.
287
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
288
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
289
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
290
+ # update.
291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
292
+ # will be added to the HTTP request.
293
+ #
294
+ # @return [ComputeResource] operation results.
295
+ #
296
+ def update(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
297
+ response = update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers).value!
298
+ response.body unless response.nil?
299
+ end
300
+
301
+ #
302
+ # @param resource_group_name [String] Name of the resource group in which
303
+ # workspace is located.
304
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
305
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
306
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
307
+ # update.
308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
309
+ # will be added to the HTTP request.
310
+ #
311
+ # @return [Concurrent::Promise] promise which provides async access to http
312
+ # response.
313
+ #
314
+ def update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
315
+ # Send request
316
+ promise = begin_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers)
317
+
318
+ promise = promise.then do |response|
319
+ # Defining deserialization method.
320
+ deserialize_method = lambda do |parsed_response|
321
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
322
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
323
+ end
324
+
325
+ # Waiting for response.
326
+ @client.get_long_running_operation_result(response, deserialize_method)
327
+ end
328
+
329
+ promise
330
+ end
331
+
332
+ #
333
+ # Deletes specified Machine Learning compute.
334
+ #
335
+ # @param resource_group_name [String] Name of the resource group in which
336
+ # workspace is located.
337
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
338
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
339
+ # @param underlying_resource_action [UnderlyingResourceAction] Delete the
340
+ # underlying compute if 'Delete', or detach the underlying compute from
341
+ # workspace if 'Detach'. Possible values include: 'Delete', 'Detach'
342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
343
+ # will be added to the HTTP request.
344
+ #
345
+ def delete(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:nil)
346
+ response = delete_async(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:custom_headers).value!
347
+ nil
348
+ end
349
+
350
+ #
351
+ # @param resource_group_name [String] Name of the resource group in which
352
+ # workspace is located.
353
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
354
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
355
+ # @param underlying_resource_action [UnderlyingResourceAction] Delete the
356
+ # underlying compute if 'Delete', or detach the underlying compute from
357
+ # workspace if 'Detach'. Possible values include: 'Delete', 'Detach'
358
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
359
+ # will be added to the HTTP request.
360
+ #
361
+ # @return [Concurrent::Promise] promise which provides async access to http
362
+ # response.
363
+ #
364
+ def delete_async(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:nil)
365
+ # Send request
366
+ promise = begin_delete_async(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:custom_headers)
367
+
368
+ promise = promise.then do |response|
369
+ # Defining deserialization method.
370
+ deserialize_method = lambda do |parsed_response|
371
+ end
372
+
373
+ # Waiting for response.
374
+ @client.get_long_running_operation_result(response, deserialize_method)
375
+ end
376
+
377
+ promise
378
+ end
379
+
380
+ #
381
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
382
+ # compute.
383
+ #
384
+ # @param resource_group_name [String] Name of the resource group in which
385
+ # workspace is located.
386
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
387
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
388
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
389
+ # will be added to the HTTP request.
390
+ #
391
+ # @return [Array<AmlComputeNodeInformation>] operation results.
392
+ #
393
+ def list_nodes(resource_group_name, workspace_name, compute_name, custom_headers:nil)
394
+ first_page = list_nodes_as_lazy(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers)
395
+ first_page.get_all_items
396
+ end
397
+
398
+ #
399
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
400
+ # compute.
401
+ #
402
+ # @param resource_group_name [String] Name of the resource group in which
403
+ # workspace is located.
404
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
405
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
406
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
407
+ # will be added to the HTTP request.
408
+ #
409
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
410
+ #
411
+ def list_nodes_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil)
412
+ list_nodes_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
413
+ end
414
+
415
+ #
416
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
417
+ # compute.
418
+ #
419
+ # @param resource_group_name [String] Name of the resource group in which
420
+ # workspace is located.
421
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
422
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
423
+ # @param [Hash{String => String}] A hash of custom headers that will be added
424
+ # to the HTTP request.
425
+ #
426
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
427
+ #
428
+ def list_nodes_async(resource_group_name, workspace_name, compute_name, custom_headers:nil)
429
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
430
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
431
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
432
+ fail ArgumentError, 'compute_name is nil' if compute_name.nil?
433
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
434
+
435
+
436
+ request_headers = {}
437
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
438
+
439
+ # Set Headers
440
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
441
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
442
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'
443
+
444
+ request_url = @base_url || @client.base_url
445
+
446
+ options = {
447
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
448
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'computeName' => compute_name},
449
+ query_params: {'api-version' => @client.api_version},
450
+ headers: request_headers.merge(custom_headers || {}),
451
+ base_url: request_url
452
+ }
453
+ promise = @client.make_request_async(:post, path_template, options)
454
+
455
+ promise = promise.then do |result|
456
+ http_response = result.response
457
+ status_code = http_response.status
458
+ response_content = http_response.body
459
+ unless status_code == 200
460
+ error_model = JSON.load(response_content)
461
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
462
+ end
463
+
464
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
465
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
466
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
467
+ # Deserialize Response
468
+ if status_code == 200
469
+ begin
470
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
471
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::AmlComputeNodesInformation.mapper()
472
+ result.body = @client.deserialize(result_mapper, parsed_response)
473
+ rescue Exception => e
474
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
475
+ end
476
+ end
477
+
478
+ result
479
+ end
480
+
481
+ promise.execute
482
+ end
483
+
484
+ #
485
+ # Gets secrets related to Machine Learning compute (storage keys, service
486
+ # credentials, etc).
487
+ #
488
+ # @param resource_group_name [String] Name of the resource group in which
489
+ # workspace is located.
490
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
491
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
492
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
493
+ # will be added to the HTTP request.
494
+ #
495
+ # @return [ComputeSecrets] operation results.
496
+ #
497
+ def list_keys(resource_group_name, workspace_name, compute_name, custom_headers:nil)
498
+ response = list_keys_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
499
+ response.body unless response.nil?
500
+ end
501
+
502
+ #
503
+ # Gets secrets related to Machine Learning compute (storage keys, service
504
+ # credentials, etc).
505
+ #
506
+ # @param resource_group_name [String] Name of the resource group in which
507
+ # workspace is located.
508
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
509
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
510
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
511
+ # will be added to the HTTP request.
512
+ #
513
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
514
+ #
515
+ def list_keys_with_http_info(resource_group_name, workspace_name, compute_name, custom_headers:nil)
516
+ list_keys_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
517
+ end
518
+
519
+ #
520
+ # Gets secrets related to Machine Learning compute (storage keys, service
521
+ # credentials, etc).
522
+ #
523
+ # @param resource_group_name [String] Name of the resource group in which
524
+ # workspace is located.
525
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
526
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
527
+ # @param [Hash{String => String}] A hash of custom headers that will be added
528
+ # to the HTTP request.
529
+ #
530
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
531
+ #
532
+ def list_keys_async(resource_group_name, workspace_name, compute_name, custom_headers:nil)
533
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
534
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
535
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
536
+ fail ArgumentError, 'compute_name is nil' if compute_name.nil?
537
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
538
+
539
+
540
+ request_headers = {}
541
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
542
+
543
+ # Set Headers
544
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
545
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
546
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'
547
+
548
+ request_url = @base_url || @client.base_url
549
+
550
+ options = {
551
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
552
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'computeName' => compute_name},
553
+ query_params: {'api-version' => @client.api_version},
554
+ headers: request_headers.merge(custom_headers || {}),
555
+ base_url: request_url
556
+ }
557
+ promise = @client.make_request_async(:post, path_template, options)
558
+
559
+ promise = promise.then do |result|
560
+ http_response = result.response
561
+ status_code = http_response.status
562
+ response_content = http_response.body
563
+ unless status_code == 200
564
+ error_model = JSON.load(response_content)
565
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
566
+ end
567
+
568
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
569
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
570
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
571
+ # Deserialize Response
572
+ if status_code == 200
573
+ begin
574
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
575
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeSecrets.mapper()
576
+ result.body = @client.deserialize(result_mapper, parsed_response)
577
+ rescue Exception => e
578
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
579
+ end
580
+ end
581
+
582
+ result
583
+ end
584
+
585
+ promise.execute
586
+ end
587
+
588
+ #
589
+ # Creates or updates compute. This call will overwrite a compute if it exists.
590
+ # This is a nonrecoverable operation. If your intent is to create a new
591
+ # compute, do a GET first to verify that it does not exist yet.
592
+ #
593
+ # @param resource_group_name [String] Name of the resource group in which
594
+ # workspace is located.
595
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
596
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
597
+ # @param parameters [ComputeResource] Payload with Machine Learning compute
598
+ # definition.
599
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
600
+ # will be added to the HTTP request.
601
+ #
602
+ # @return [ComputeResource] operation results.
603
+ #
604
+ def begin_create_or_update(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
605
+ response = begin_create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers).value!
606
+ response.body unless response.nil?
607
+ end
608
+
609
+ #
610
+ # Creates or updates compute. This call will overwrite a compute if it exists.
611
+ # This is a nonrecoverable operation. If your intent is to create a new
612
+ # compute, do a GET first to verify that it does not exist yet.
613
+ #
614
+ # @param resource_group_name [String] Name of the resource group in which
615
+ # workspace is located.
616
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
617
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
618
+ # @param parameters [ComputeResource] Payload with Machine Learning compute
619
+ # definition.
620
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
621
+ # will be added to the HTTP request.
622
+ #
623
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
624
+ #
625
+ def begin_create_or_update_with_http_info(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
626
+ begin_create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers).value!
627
+ end
628
+
629
+ #
630
+ # Creates or updates compute. This call will overwrite a compute if it exists.
631
+ # This is a nonrecoverable operation. If your intent is to create a new
632
+ # compute, do a GET first to verify that it does not exist yet.
633
+ #
634
+ # @param resource_group_name [String] Name of the resource group in which
635
+ # workspace is located.
636
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
637
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
638
+ # @param parameters [ComputeResource] Payload with Machine Learning compute
639
+ # definition.
640
+ # @param [Hash{String => String}] A hash of custom headers that will be added
641
+ # to the HTTP request.
642
+ #
643
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
644
+ #
645
+ def begin_create_or_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
646
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
647
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
648
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
649
+ fail ArgumentError, 'compute_name is nil' if compute_name.nil?
650
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
651
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
652
+
653
+
654
+ request_headers = {}
655
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
656
+
657
+ # Set Headers
658
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
659
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
660
+
661
+ # Serialize Request
662
+ request_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
663
+ request_content = @client.serialize(request_mapper, parameters)
664
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
665
+
666
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'
667
+
668
+ request_url = @base_url || @client.base_url
669
+
670
+ options = {
671
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
672
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'computeName' => compute_name},
673
+ query_params: {'api-version' => @client.api_version},
674
+ body: request_content,
675
+ headers: request_headers.merge(custom_headers || {}),
676
+ base_url: request_url
677
+ }
678
+ promise = @client.make_request_async(:put, path_template, options)
679
+
680
+ promise = promise.then do |result|
681
+ http_response = result.response
682
+ status_code = http_response.status
683
+ response_content = http_response.body
684
+ unless status_code == 200 || status_code == 201
685
+ error_model = JSON.load(response_content)
686
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
687
+ end
688
+
689
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
690
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
691
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
692
+ # Deserialize Response
693
+ if status_code == 200
694
+ begin
695
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
696
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
697
+ result.body = @client.deserialize(result_mapper, parsed_response)
698
+ rescue Exception => e
699
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
700
+ end
701
+ end
702
+ # Deserialize Response
703
+ if status_code == 201
704
+ begin
705
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
706
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
707
+ result.body = @client.deserialize(result_mapper, parsed_response)
708
+ rescue Exception => e
709
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
710
+ end
711
+ end
712
+
713
+ result
714
+ end
715
+
716
+ promise.execute
717
+ end
718
+
719
+ #
720
+ # Updates properties of a compute. This call will overwrite a compute if it
721
+ # exists. This is a nonrecoverable operation.
722
+ #
723
+ # @param resource_group_name [String] Name of the resource group in which
724
+ # workspace is located.
725
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
726
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
727
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
728
+ # update.
729
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
730
+ # will be added to the HTTP request.
731
+ #
732
+ # @return [ComputeResource] operation results.
733
+ #
734
+ def begin_update(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
735
+ response = begin_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers).value!
736
+ response.body unless response.nil?
737
+ end
738
+
739
+ #
740
+ # Updates properties of a compute. This call will overwrite a compute if it
741
+ # exists. This is a nonrecoverable operation.
742
+ #
743
+ # @param resource_group_name [String] Name of the resource group in which
744
+ # workspace is located.
745
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
746
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
747
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
748
+ # update.
749
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
750
+ # will be added to the HTTP request.
751
+ #
752
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
753
+ #
754
+ def begin_update_with_http_info(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
755
+ begin_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:custom_headers).value!
756
+ end
757
+
758
+ #
759
+ # Updates properties of a compute. This call will overwrite a compute if it
760
+ # exists. This is a nonrecoverable operation.
761
+ #
762
+ # @param resource_group_name [String] Name of the resource group in which
763
+ # workspace is located.
764
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
765
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
766
+ # @param parameters [ClusterUpdateParameters] Additional parameters for cluster
767
+ # update.
768
+ # @param [Hash{String => String}] A hash of custom headers that will be added
769
+ # to the HTTP request.
770
+ #
771
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
772
+ #
773
+ def begin_update_async(resource_group_name, workspace_name, compute_name, parameters, custom_headers:nil)
774
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
775
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
776
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
777
+ fail ArgumentError, 'compute_name is nil' if compute_name.nil?
778
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
779
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
780
+
781
+
782
+ request_headers = {}
783
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
784
+
785
+ # Set Headers
786
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
787
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
788
+
789
+ # Serialize Request
790
+ request_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ClusterUpdateParameters.mapper()
791
+ request_content = @client.serialize(request_mapper, parameters)
792
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
793
+
794
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'
795
+
796
+ request_url = @base_url || @client.base_url
797
+
798
+ options = {
799
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
800
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'computeName' => compute_name},
801
+ query_params: {'api-version' => @client.api_version},
802
+ body: request_content,
803
+ headers: request_headers.merge(custom_headers || {}),
804
+ base_url: request_url
805
+ }
806
+ promise = @client.make_request_async(:patch, path_template, options)
807
+
808
+ promise = promise.then do |result|
809
+ http_response = result.response
810
+ status_code = http_response.status
811
+ response_content = http_response.body
812
+ unless status_code == 200
813
+ error_model = JSON.load(response_content)
814
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
815
+ end
816
+
817
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
818
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
819
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
820
+ # Deserialize Response
821
+ if status_code == 200
822
+ begin
823
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
824
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ComputeResource.mapper()
825
+ result.body = @client.deserialize(result_mapper, parsed_response)
826
+ rescue Exception => e
827
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
828
+ end
829
+ end
830
+
831
+ result
832
+ end
833
+
834
+ promise.execute
835
+ end
836
+
837
+ #
838
+ # Deletes specified Machine Learning compute.
839
+ #
840
+ # @param resource_group_name [String] Name of the resource group in which
841
+ # workspace is located.
842
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
843
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
844
+ # @param underlying_resource_action [UnderlyingResourceAction] Delete the
845
+ # underlying compute if 'Delete', or detach the underlying compute from
846
+ # workspace if 'Detach'. Possible values include: 'Delete', 'Detach'
847
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
848
+ # will be added to the HTTP request.
849
+ #
850
+ #
851
+ def begin_delete(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:nil)
852
+ response = begin_delete_async(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:custom_headers).value!
853
+ nil
854
+ end
855
+
856
+ #
857
+ # Deletes specified Machine Learning compute.
858
+ #
859
+ # @param resource_group_name [String] Name of the resource group in which
860
+ # workspace is located.
861
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
862
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
863
+ # @param underlying_resource_action [UnderlyingResourceAction] Delete the
864
+ # underlying compute if 'Delete', or detach the underlying compute from
865
+ # workspace if 'Detach'. Possible values include: 'Delete', 'Detach'
866
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
867
+ # will be added to the HTTP request.
868
+ #
869
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
870
+ #
871
+ def begin_delete_with_http_info(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:nil)
872
+ begin_delete_async(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:custom_headers).value!
873
+ end
874
+
875
+ #
876
+ # Deletes specified Machine Learning compute.
877
+ #
878
+ # @param resource_group_name [String] Name of the resource group in which
879
+ # workspace is located.
880
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
881
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
882
+ # @param underlying_resource_action [UnderlyingResourceAction] Delete the
883
+ # underlying compute if 'Delete', or detach the underlying compute from
884
+ # workspace if 'Detach'. Possible values include: 'Delete', 'Detach'
885
+ # @param [Hash{String => String}] A hash of custom headers that will be added
886
+ # to the HTTP request.
887
+ #
888
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
889
+ #
890
+ def begin_delete_async(resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers:nil)
891
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
892
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
893
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
894
+ fail ArgumentError, 'compute_name is nil' if compute_name.nil?
895
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
896
+ fail ArgumentError, 'underlying_resource_action is nil' if underlying_resource_action.nil?
897
+
898
+
899
+ request_headers = {}
900
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
901
+
902
+ # Set Headers
903
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
904
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
905
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'
906
+
907
+ request_url = @base_url || @client.base_url
908
+
909
+ options = {
910
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
911
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'computeName' => compute_name},
912
+ query_params: {'api-version' => @client.api_version,'underlyingResourceAction' => underlying_resource_action},
913
+ headers: request_headers.merge(custom_headers || {}),
914
+ base_url: request_url
915
+ }
916
+ promise = @client.make_request_async(:delete, path_template, options)
917
+
918
+ promise = promise.then do |result|
919
+ http_response = result.response
920
+ status_code = http_response.status
921
+ response_content = http_response.body
922
+ unless status_code == 200 || status_code == 202
923
+ error_model = JSON.load(response_content)
924
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
925
+ end
926
+
927
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
928
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
929
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
930
+
931
+ result
932
+ end
933
+
934
+ promise.execute
935
+ end
936
+
937
+ #
938
+ # Gets computes in specified workspace.
939
+ #
940
+ # @param next_page_link [String] The NextLink from the previous successful call
941
+ # to List operation.
942
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
943
+ # will be added to the HTTP request.
944
+ #
945
+ # @return [PaginatedComputeResourcesList] operation results.
946
+ #
947
+ def list_by_workspace_next(next_page_link, custom_headers:nil)
948
+ response = list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
949
+ response.body unless response.nil?
950
+ end
951
+
952
+ #
953
+ # Gets computes in specified workspace.
954
+ #
955
+ # @param next_page_link [String] The NextLink from the previous successful call
956
+ # to List operation.
957
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
958
+ # will be added to the HTTP request.
959
+ #
960
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
961
+ #
962
+ def list_by_workspace_next_with_http_info(next_page_link, custom_headers:nil)
963
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
964
+ end
965
+
966
+ #
967
+ # Gets computes in specified workspace.
968
+ #
969
+ # @param next_page_link [String] The NextLink from the previous successful call
970
+ # to List operation.
971
+ # @param [Hash{String => String}] A hash of custom headers that will be added
972
+ # to the HTTP request.
973
+ #
974
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
975
+ #
976
+ def list_by_workspace_next_async(next_page_link, custom_headers:nil)
977
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
978
+
979
+
980
+ request_headers = {}
981
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
982
+
983
+ # Set Headers
984
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
985
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
986
+ path_template = '{nextLink}'
987
+
988
+ request_url = @base_url || @client.base_url
989
+
990
+ options = {
991
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
992
+ skip_encoding_path_params: {'nextLink' => next_page_link},
993
+ headers: request_headers.merge(custom_headers || {}),
994
+ base_url: request_url
995
+ }
996
+ promise = @client.make_request_async(:get, path_template, options)
997
+
998
+ promise = promise.then do |result|
999
+ http_response = result.response
1000
+ status_code = http_response.status
1001
+ response_content = http_response.body
1002
+ unless status_code == 200
1003
+ error_model = JSON.load(response_content)
1004
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1005
+ end
1006
+
1007
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1008
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1009
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1010
+ # Deserialize Response
1011
+ if status_code == 200
1012
+ begin
1013
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1014
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::PaginatedComputeResourcesList.mapper()
1015
+ result.body = @client.deserialize(result_mapper, parsed_response)
1016
+ rescue Exception => e
1017
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1018
+ end
1019
+ end
1020
+
1021
+ result
1022
+ end
1023
+
1024
+ promise.execute
1025
+ end
1026
+
1027
+ #
1028
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
1029
+ # compute.
1030
+ #
1031
+ # @param next_page_link [String] The NextLink from the previous successful call
1032
+ # to List operation.
1033
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1034
+ # will be added to the HTTP request.
1035
+ #
1036
+ # @return [AmlComputeNodesInformation] operation results.
1037
+ #
1038
+ def list_nodes_next(next_page_link, custom_headers:nil)
1039
+ response = list_nodes_next_async(next_page_link, custom_headers:custom_headers).value!
1040
+ response.body unless response.nil?
1041
+ end
1042
+
1043
+ #
1044
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
1045
+ # compute.
1046
+ #
1047
+ # @param next_page_link [String] The NextLink from the previous successful call
1048
+ # to List operation.
1049
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1050
+ # will be added to the HTTP request.
1051
+ #
1052
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1053
+ #
1054
+ def list_nodes_next_with_http_info(next_page_link, custom_headers:nil)
1055
+ list_nodes_next_async(next_page_link, custom_headers:custom_headers).value!
1056
+ end
1057
+
1058
+ #
1059
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
1060
+ # compute.
1061
+ #
1062
+ # @param next_page_link [String] The NextLink from the previous successful call
1063
+ # to List operation.
1064
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1065
+ # to the HTTP request.
1066
+ #
1067
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1068
+ #
1069
+ def list_nodes_next_async(next_page_link, custom_headers:nil)
1070
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1071
+
1072
+
1073
+ request_headers = {}
1074
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1075
+
1076
+ # Set Headers
1077
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1078
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1079
+ path_template = '{nextLink}'
1080
+
1081
+ request_url = @base_url || @client.base_url
1082
+
1083
+ options = {
1084
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1085
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1086
+ headers: request_headers.merge(custom_headers || {}),
1087
+ base_url: request_url
1088
+ }
1089
+ promise = @client.make_request_async(:post, path_template, options)
1090
+
1091
+ promise = promise.then do |result|
1092
+ http_response = result.response
1093
+ status_code = http_response.status
1094
+ response_content = http_response.body
1095
+ unless status_code == 200
1096
+ error_model = JSON.load(response_content)
1097
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1098
+ end
1099
+
1100
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1101
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1102
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1103
+ # Deserialize Response
1104
+ if status_code == 200
1105
+ begin
1106
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1107
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::AmlComputeNodesInformation.mapper()
1108
+ result.body = @client.deserialize(result_mapper, parsed_response)
1109
+ rescue Exception => e
1110
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1111
+ end
1112
+ end
1113
+
1114
+ result
1115
+ end
1116
+
1117
+ promise.execute
1118
+ end
1119
+
1120
+ #
1121
+ # Gets computes in specified workspace.
1122
+ #
1123
+ # @param resource_group_name [String] Name of the resource group in which
1124
+ # workspace is located.
1125
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
1126
+ # @param skiptoken [String] Continuation token for pagination.
1127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1128
+ # will be added to the HTTP request.
1129
+ #
1130
+ # @return [PaginatedComputeResourcesList] which provide lazy access to pages of
1131
+ # the response.
1132
+ #
1133
+ def list_by_workspace_as_lazy(resource_group_name, workspace_name, skiptoken:nil, custom_headers:nil)
1134
+ response = list_by_workspace_async(resource_group_name, workspace_name, skiptoken:skiptoken, custom_headers:custom_headers).value!
1135
+ unless response.nil?
1136
+ page = response.body
1137
+ page.next_method = Proc.new do |next_page_link|
1138
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers)
1139
+ end
1140
+ page
1141
+ end
1142
+ end
1143
+
1144
+ #
1145
+ # Get the details (e.g IP address, port etc) of all the compute nodes in the
1146
+ # compute.
1147
+ #
1148
+ # @param resource_group_name [String] Name of the resource group in which
1149
+ # workspace is located.
1150
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
1151
+ # @param compute_name [String] Name of the Azure Machine Learning compute.
1152
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1153
+ # will be added to the HTTP request.
1154
+ #
1155
+ # @return [AmlComputeNodesInformation] which provide lazy access to pages of
1156
+ # the response.
1157
+ #
1158
+ def list_nodes_as_lazy(resource_group_name, workspace_name, compute_name, custom_headers:nil)
1159
+ response = list_nodes_async(resource_group_name, workspace_name, compute_name, custom_headers:custom_headers).value!
1160
+ unless response.nil?
1161
+ page = response.body
1162
+ page.next_method = Proc.new do |next_page_link|
1163
+ list_nodes_next_async(next_page_link, custom_headers:custom_headers)
1164
+ end
1165
+ page
1166
+ end
1167
+ end
1168
+
1169
+ end
1170
+ end