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
@@ -0,0 +1,1053 @@
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::V2019_05_01
7
+ #
8
+ # These APIs allow end users to operate on Azure Machine Learning Workspace
9
+ # resources.
10
+ #
11
+ class Workspaces
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Workspaces 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 the properties of the specified machine learning 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 custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [Workspace] operation results.
35
+ #
36
+ def get(resource_group_name, workspace_name, custom_headers:nil)
37
+ response = get_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Gets the properties of the specified machine learning workspace.
43
+ #
44
+ # @param resource_group_name [String] Name of the resource group in which
45
+ # workspace is located.
46
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def get_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
53
+ get_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Gets the properties of the specified machine learning workspace.
58
+ #
59
+ # @param resource_group_name [String] Name of the resource group in which
60
+ # workspace is located.
61
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
62
+ # @param [Hash{String => String}] A hash of custom headers that will be added
63
+ # to the HTTP request.
64
+ #
65
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
+ #
67
+ def get_async(resource_group_name, workspace_name, custom_headers:nil)
68
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
69
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
70
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
71
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
72
+
73
+
74
+ request_headers = {}
75
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
76
+
77
+ # Set Headers
78
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
79
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
80
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'
81
+
82
+ request_url = @base_url || @client.base_url
83
+
84
+ options = {
85
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
86
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
87
+ query_params: {'api-version' => @client.api_version},
88
+ headers: request_headers.merge(custom_headers || {}),
89
+ base_url: request_url
90
+ }
91
+ promise = @client.make_request_async(:get, path_template, options)
92
+
93
+ promise = promise.then do |result|
94
+ http_response = result.response
95
+ status_code = http_response.status
96
+ response_content = http_response.body
97
+ unless status_code == 200
98
+ error_model = JSON.load(response_content)
99
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
100
+ end
101
+
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?
105
+ # Deserialize Response
106
+ if status_code == 200
107
+ begin
108
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
109
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::Workspace.mapper()
110
+ result.body = @client.deserialize(result_mapper, parsed_response)
111
+ rescue Exception => e
112
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
113
+ end
114
+ end
115
+
116
+ result
117
+ end
118
+
119
+ promise.execute
120
+ end
121
+
122
+ #
123
+ # Creates or updates a workspace with the specified parameters.
124
+ #
125
+ # @param resource_group_name [String] Name of the resource group in which
126
+ # workspace is located.
127
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
128
+ # @param parameters [Workspace] The parameters for creating or updating a
129
+ # machine learning workspace.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [Workspace] operation results.
134
+ #
135
+ def create_or_update(resource_group_name, workspace_name, parameters, custom_headers:nil)
136
+ response = create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
137
+ response.body unless response.nil?
138
+ end
139
+
140
+ #
141
+ # Creates or updates a workspace with the specified parameters.
142
+ #
143
+ # @param resource_group_name [String] Name of the resource group in which
144
+ # workspace is located.
145
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
146
+ # @param parameters [Workspace] The parameters for creating or updating a
147
+ # machine learning workspace.
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
152
+ #
153
+ def create_or_update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil)
154
+ create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
155
+ end
156
+
157
+ #
158
+ # Creates or updates a workspace with the specified parameters.
159
+ #
160
+ # @param resource_group_name [String] Name of the resource group in which
161
+ # workspace is located.
162
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
163
+ # @param parameters [Workspace] The parameters for creating or updating a
164
+ # machine learning workspace.
165
+ # @param [Hash{String => String}] A hash of custom headers that will be added
166
+ # to the HTTP request.
167
+ #
168
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
169
+ #
170
+ def create_or_update_async(resource_group_name, workspace_name, parameters, custom_headers:nil)
171
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
172
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
173
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
174
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
175
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
176
+
177
+
178
+ request_headers = {}
179
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
180
+
181
+ # Set Headers
182
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
183
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
184
+
185
+ # Serialize Request
186
+ request_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::Workspace.mapper()
187
+ request_content = @client.serialize(request_mapper, parameters)
188
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
189
+
190
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'
191
+
192
+ request_url = @base_url || @client.base_url
193
+
194
+ options = {
195
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
196
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
197
+ query_params: {'api-version' => @client.api_version},
198
+ body: request_content,
199
+ headers: request_headers.merge(custom_headers || {}),
200
+ base_url: request_url
201
+ }
202
+ promise = @client.make_request_async(:put, path_template, options)
203
+
204
+ promise = promise.then do |result|
205
+ http_response = result.response
206
+ status_code = http_response.status
207
+ response_content = http_response.body
208
+ unless status_code == 200 || status_code == 201
209
+ error_model = JSON.load(response_content)
210
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
211
+ end
212
+
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?
216
+ # Deserialize Response
217
+ if status_code == 200
218
+ begin
219
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
220
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::Workspace.mapper()
221
+ result.body = @client.deserialize(result_mapper, parsed_response)
222
+ rescue Exception => e
223
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
224
+ end
225
+ end
226
+ # Deserialize Response
227
+ if status_code == 201
228
+ begin
229
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
230
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::Workspace.mapper()
231
+ result.body = @client.deserialize(result_mapper, parsed_response)
232
+ rescue Exception => e
233
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
234
+ end
235
+ end
236
+
237
+ result
238
+ end
239
+
240
+ promise.execute
241
+ end
242
+
243
+ #
244
+ # Deletes a machine learning workspace.
245
+ #
246
+ # @param resource_group_name [String] Name of the resource group in which
247
+ # workspace is located.
248
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ #
253
+ def delete(resource_group_name, workspace_name, custom_headers:nil)
254
+ response = delete_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
255
+ nil
256
+ end
257
+
258
+ #
259
+ # Deletes a machine learning workspace.
260
+ #
261
+ # @param resource_group_name [String] Name of the resource group in which
262
+ # workspace is located.
263
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
264
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
265
+ # will be added to the HTTP request.
266
+ #
267
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
268
+ #
269
+ def delete_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
270
+ delete_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
271
+ end
272
+
273
+ #
274
+ # Deletes a machine learning workspace.
275
+ #
276
+ # @param resource_group_name [String] Name of the resource group in which
277
+ # workspace is located.
278
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
279
+ # @param [Hash{String => String}] A hash of custom headers that will be added
280
+ # to the HTTP request.
281
+ #
282
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
283
+ #
284
+ def delete_async(resource_group_name, workspace_name, custom_headers:nil)
285
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
286
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
287
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
288
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
289
+
290
+
291
+ request_headers = {}
292
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
293
+
294
+ # Set Headers
295
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
296
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
297
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'
298
+
299
+ request_url = @base_url || @client.base_url
300
+
301
+ options = {
302
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
303
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
304
+ query_params: {'api-version' => @client.api_version},
305
+ headers: request_headers.merge(custom_headers || {}),
306
+ base_url: request_url
307
+ }
308
+ promise = @client.make_request_async(:delete, path_template, options)
309
+
310
+ promise = promise.then do |result|
311
+ http_response = result.response
312
+ status_code = http_response.status
313
+ response_content = http_response.body
314
+ unless status_code == 200 || status_code == 204
315
+ error_model = JSON.load(response_content)
316
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
317
+ end
318
+
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?
322
+
323
+ result
324
+ end
325
+
326
+ promise.execute
327
+ end
328
+
329
+ #
330
+ # Updates a machine learning workspace with the specified parameters.
331
+ #
332
+ # @param resource_group_name [String] Name of the resource group in which
333
+ # workspace is located.
334
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
335
+ # @param parameters [WorkspaceUpdateParameters] The parameters for updating a
336
+ # machine learning workspace.
337
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
338
+ # will be added to the HTTP request.
339
+ #
340
+ # @return [Workspace] operation results.
341
+ #
342
+ def update(resource_group_name, workspace_name, parameters, custom_headers:nil)
343
+ response = update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
344
+ response.body unless response.nil?
345
+ end
346
+
347
+ #
348
+ # Updates a machine learning workspace with the specified parameters.
349
+ #
350
+ # @param resource_group_name [String] Name of the resource group in which
351
+ # workspace is located.
352
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
353
+ # @param parameters [WorkspaceUpdateParameters] The parameters for updating a
354
+ # machine learning workspace.
355
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
356
+ # will be added to the HTTP request.
357
+ #
358
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
359
+ #
360
+ def update_with_http_info(resource_group_name, workspace_name, parameters, custom_headers:nil)
361
+ update_async(resource_group_name, workspace_name, parameters, custom_headers:custom_headers).value!
362
+ end
363
+
364
+ #
365
+ # Updates a machine learning workspace with the specified parameters.
366
+ #
367
+ # @param resource_group_name [String] Name of the resource group in which
368
+ # workspace is located.
369
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
370
+ # @param parameters [WorkspaceUpdateParameters] The parameters for updating a
371
+ # machine learning workspace.
372
+ # @param [Hash{String => String}] A hash of custom headers that will be added
373
+ # to the HTTP request.
374
+ #
375
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
376
+ #
377
+ def update_async(resource_group_name, workspace_name, parameters, custom_headers:nil)
378
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
379
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
380
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
381
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
382
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
383
+
384
+
385
+ request_headers = {}
386
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
387
+
388
+ # Set Headers
389
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
390
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
391
+
392
+ # Serialize Request
393
+ request_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::WorkspaceUpdateParameters.mapper()
394
+ request_content = @client.serialize(request_mapper, parameters)
395
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
396
+
397
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'
398
+
399
+ request_url = @base_url || @client.base_url
400
+
401
+ options = {
402
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
403
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
404
+ query_params: {'api-version' => @client.api_version},
405
+ body: request_content,
406
+ headers: request_headers.merge(custom_headers || {}),
407
+ base_url: request_url
408
+ }
409
+ promise = @client.make_request_async(:patch, path_template, options)
410
+
411
+ promise = promise.then do |result|
412
+ http_response = result.response
413
+ status_code = http_response.status
414
+ response_content = http_response.body
415
+ unless status_code == 200
416
+ error_model = JSON.load(response_content)
417
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
418
+ end
419
+
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?
423
+ # Deserialize Response
424
+ if status_code == 200
425
+ begin
426
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
427
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::Workspace.mapper()
428
+ result.body = @client.deserialize(result_mapper, parsed_response)
429
+ rescue Exception => e
430
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
431
+ end
432
+ end
433
+
434
+ result
435
+ end
436
+
437
+ promise.execute
438
+ end
439
+
440
+ #
441
+ # Lists all the available machine learning workspaces under the specified
442
+ # resource group.
443
+ #
444
+ # @param resource_group_name [String] Name of the resource group in which
445
+ # workspace is located.
446
+ # @param skiptoken [String] Continuation token for pagination.
447
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
448
+ # will be added to the HTTP request.
449
+ #
450
+ # @return [Array<Workspace>] operation results.
451
+ #
452
+ def list_by_resource_group(resource_group_name, skiptoken:nil, custom_headers:nil)
453
+ first_page = list_by_resource_group_as_lazy(resource_group_name, skiptoken:skiptoken, custom_headers:custom_headers)
454
+ first_page.get_all_items
455
+ end
456
+
457
+ #
458
+ # Lists all the available machine learning workspaces under the specified
459
+ # resource group.
460
+ #
461
+ # @param resource_group_name [String] Name of the resource group in which
462
+ # workspace is located.
463
+ # @param skiptoken [String] Continuation token for pagination.
464
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
465
+ # will be added to the HTTP request.
466
+ #
467
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
468
+ #
469
+ def list_by_resource_group_with_http_info(resource_group_name, skiptoken:nil, custom_headers:nil)
470
+ list_by_resource_group_async(resource_group_name, skiptoken:skiptoken, custom_headers:custom_headers).value!
471
+ end
472
+
473
+ #
474
+ # Lists all the available machine learning workspaces under the specified
475
+ # resource group.
476
+ #
477
+ # @param resource_group_name [String] Name of the resource group in which
478
+ # workspace is located.
479
+ # @param skiptoken [String] Continuation token for pagination.
480
+ # @param [Hash{String => String}] A hash of custom headers that will be added
481
+ # to the HTTP request.
482
+ #
483
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
484
+ #
485
+ def list_by_resource_group_async(resource_group_name, skiptoken:nil, custom_headers:nil)
486
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
487
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
488
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
489
+
490
+
491
+ request_headers = {}
492
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
493
+
494
+ # Set Headers
495
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
496
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
497
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'
498
+
499
+ request_url = @base_url || @client.base_url
500
+
501
+ options = {
502
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
503
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
504
+ query_params: {'api-version' => @client.api_version,'$skiptoken' => skiptoken},
505
+ headers: request_headers.merge(custom_headers || {}),
506
+ base_url: request_url
507
+ }
508
+ promise = @client.make_request_async(:get, path_template, options)
509
+
510
+ promise = promise.then do |result|
511
+ http_response = result.response
512
+ status_code = http_response.status
513
+ response_content = http_response.body
514
+ unless status_code == 200
515
+ error_model = JSON.load(response_content)
516
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
517
+ end
518
+
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?
522
+ # Deserialize Response
523
+ if status_code == 200
524
+ begin
525
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
526
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::WorkspaceListResult.mapper()
527
+ result.body = @client.deserialize(result_mapper, parsed_response)
528
+ rescue Exception => e
529
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
530
+ end
531
+ end
532
+
533
+ result
534
+ end
535
+
536
+ promise.execute
537
+ end
538
+
539
+ #
540
+ # Lists all the keys associated with this workspace. This includes keys for the
541
+ # storage account, app insights and password for container registry
542
+ #
543
+ # @param resource_group_name [String] Name of the resource group in which
544
+ # workspace is located.
545
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
546
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
547
+ # will be added to the HTTP request.
548
+ #
549
+ # @return [ListWorkspaceKeysResult] operation results.
550
+ #
551
+ def list_keys(resource_group_name, workspace_name, custom_headers:nil)
552
+ response = list_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
553
+ response.body unless response.nil?
554
+ end
555
+
556
+ #
557
+ # Lists all the keys associated with this workspace. This includes keys for the
558
+ # storage account, app insights and password for container registry
559
+ #
560
+ # @param resource_group_name [String] Name of the resource group in which
561
+ # workspace is located.
562
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
563
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
564
+ # will be added to the HTTP request.
565
+ #
566
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
567
+ #
568
+ def list_keys_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
569
+ list_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
570
+ end
571
+
572
+ #
573
+ # Lists all the keys associated with this workspace. This includes keys for the
574
+ # storage account, app insights and password for container registry
575
+ #
576
+ # @param resource_group_name [String] Name of the resource group in which
577
+ # workspace is located.
578
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
579
+ # @param [Hash{String => String}] A hash of custom headers that will be added
580
+ # to the HTTP request.
581
+ #
582
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
583
+ #
584
+ def list_keys_async(resource_group_name, workspace_name, custom_headers:nil)
585
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
586
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
587
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
588
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
589
+
590
+
591
+ request_headers = {}
592
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
593
+
594
+ # Set Headers
595
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
596
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
597
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'
598
+
599
+ request_url = @base_url || @client.base_url
600
+
601
+ options = {
602
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
603
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
604
+ query_params: {'api-version' => @client.api_version},
605
+ headers: request_headers.merge(custom_headers || {}),
606
+ base_url: request_url
607
+ }
608
+ promise = @client.make_request_async(:post, path_template, options)
609
+
610
+ promise = promise.then do |result|
611
+ http_response = result.response
612
+ status_code = http_response.status
613
+ response_content = http_response.body
614
+ unless status_code == 200
615
+ error_model = JSON.load(response_content)
616
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
617
+ end
618
+
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?
622
+ # Deserialize Response
623
+ if status_code == 200
624
+ begin
625
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
626
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::ListWorkspaceKeysResult.mapper()
627
+ result.body = @client.deserialize(result_mapper, parsed_response)
628
+ rescue Exception => e
629
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
630
+ end
631
+ end
632
+
633
+ result
634
+ end
635
+
636
+ promise.execute
637
+ end
638
+
639
+ #
640
+ # Resync all the keys associated with this workspace. This includes keys for
641
+ # the storage account, app insights and password for container registry
642
+ #
643
+ # @param resource_group_name [String] Name of the resource group in which
644
+ # workspace is located.
645
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
646
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
647
+ # will be added to the HTTP request.
648
+ #
649
+ #
650
+ def resync_keys(resource_group_name, workspace_name, custom_headers:nil)
651
+ response = resync_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
652
+ nil
653
+ end
654
+
655
+ #
656
+ # Resync all the keys associated with this workspace. This includes keys for
657
+ # the storage account, app insights and password for container registry
658
+ #
659
+ # @param resource_group_name [String] Name of the resource group in which
660
+ # workspace is located.
661
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
662
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
663
+ # will be added to the HTTP request.
664
+ #
665
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
666
+ #
667
+ def resync_keys_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
668
+ resync_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
669
+ end
670
+
671
+ #
672
+ # Resync all the keys associated with this workspace. This includes keys for
673
+ # the storage account, app insights and password for container registry
674
+ #
675
+ # @param resource_group_name [String] Name of the resource group in which
676
+ # workspace is located.
677
+ # @param workspace_name [String] Name of Azure Machine Learning workspace.
678
+ # @param [Hash{String => String}] A hash of custom headers that will be added
679
+ # to the HTTP request.
680
+ #
681
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
682
+ #
683
+ def resync_keys_async(resource_group_name, workspace_name, custom_headers:nil)
684
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
685
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
686
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
687
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
688
+
689
+
690
+ request_headers = {}
691
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
692
+
693
+ # Set Headers
694
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
695
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
696
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'
697
+
698
+ request_url = @base_url || @client.base_url
699
+
700
+ options = {
701
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
702
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
703
+ query_params: {'api-version' => @client.api_version},
704
+ headers: request_headers.merge(custom_headers || {}),
705
+ base_url: request_url
706
+ }
707
+ promise = @client.make_request_async(:post, path_template, options)
708
+
709
+ promise = promise.then do |result|
710
+ http_response = result.response
711
+ status_code = http_response.status
712
+ response_content = http_response.body
713
+ unless status_code == 200
714
+ error_model = JSON.load(response_content)
715
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
716
+ end
717
+
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?
721
+
722
+ result
723
+ end
724
+
725
+ promise.execute
726
+ end
727
+
728
+ #
729
+ # Lists all the available machine learning workspaces under the specified
730
+ # subscription.
731
+ #
732
+ # @param skiptoken [String] Continuation token for pagination.
733
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
734
+ # will be added to the HTTP request.
735
+ #
736
+ # @return [Array<Workspace>] operation results.
737
+ #
738
+ def list_by_subscription(skiptoken:nil, custom_headers:nil)
739
+ first_page = list_by_subscription_as_lazy(skiptoken:skiptoken, custom_headers:custom_headers)
740
+ first_page.get_all_items
741
+ end
742
+
743
+ #
744
+ # Lists all the available machine learning workspaces under the specified
745
+ # subscription.
746
+ #
747
+ # @param skiptoken [String] Continuation token for pagination.
748
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
749
+ # will be added to the HTTP request.
750
+ #
751
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
752
+ #
753
+ def list_by_subscription_with_http_info(skiptoken:nil, custom_headers:nil)
754
+ list_by_subscription_async(skiptoken:skiptoken, custom_headers:custom_headers).value!
755
+ end
756
+
757
+ #
758
+ # Lists all the available machine learning workspaces under the specified
759
+ # subscription.
760
+ #
761
+ # @param skiptoken [String] Continuation token for pagination.
762
+ # @param [Hash{String => String}] A hash of custom headers that will be added
763
+ # to the HTTP request.
764
+ #
765
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
766
+ #
767
+ def list_by_subscription_async(skiptoken:nil, custom_headers:nil)
768
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
769
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
770
+
771
+
772
+ request_headers = {}
773
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
774
+
775
+ # Set Headers
776
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
777
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
778
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'
779
+
780
+ request_url = @base_url || @client.base_url
781
+
782
+ options = {
783
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
784
+ path_params: {'subscriptionId' => @client.subscription_id},
785
+ query_params: {'api-version' => @client.api_version,'$skiptoken' => skiptoken},
786
+ headers: request_headers.merge(custom_headers || {}),
787
+ base_url: request_url
788
+ }
789
+ promise = @client.make_request_async(:get, path_template, options)
790
+
791
+ promise = promise.then do |result|
792
+ http_response = result.response
793
+ status_code = http_response.status
794
+ response_content = http_response.body
795
+ unless status_code == 200
796
+ error_model = JSON.load(response_content)
797
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
798
+ end
799
+
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?
803
+ # Deserialize Response
804
+ if status_code == 200
805
+ begin
806
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
807
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::WorkspaceListResult.mapper()
808
+ result.body = @client.deserialize(result_mapper, parsed_response)
809
+ rescue Exception => e
810
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
811
+ end
812
+ end
813
+
814
+ result
815
+ end
816
+
817
+ promise.execute
818
+ end
819
+
820
+ #
821
+ # Lists all the available machine learning workspaces under the specified
822
+ # resource group.
823
+ #
824
+ # @param next_page_link [String] The NextLink from the previous successful call
825
+ # to List operation.
826
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
827
+ # will be added to the HTTP request.
828
+ #
829
+ # @return [WorkspaceListResult] operation results.
830
+ #
831
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
832
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
833
+ response.body unless response.nil?
834
+ end
835
+
836
+ #
837
+ # Lists all the available machine learning workspaces under the specified
838
+ # resource group.
839
+ #
840
+ # @param next_page_link [String] The NextLink from the previous successful call
841
+ # to List operation.
842
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
843
+ # will be added to the HTTP request.
844
+ #
845
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
846
+ #
847
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
848
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
849
+ end
850
+
851
+ #
852
+ # Lists all the available machine learning workspaces under the specified
853
+ # resource group.
854
+ #
855
+ # @param next_page_link [String] The NextLink from the previous successful call
856
+ # to List operation.
857
+ # @param [Hash{String => String}] A hash of custom headers that will be added
858
+ # to the HTTP request.
859
+ #
860
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
861
+ #
862
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
863
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
864
+
865
+
866
+ request_headers = {}
867
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
868
+
869
+ # Set Headers
870
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
871
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
872
+ path_template = '{nextLink}'
873
+
874
+ request_url = @base_url || @client.base_url
875
+
876
+ options = {
877
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
878
+ skip_encoding_path_params: {'nextLink' => next_page_link},
879
+ headers: request_headers.merge(custom_headers || {}),
880
+ base_url: request_url
881
+ }
882
+ promise = @client.make_request_async(:get, path_template, options)
883
+
884
+ promise = promise.then do |result|
885
+ http_response = result.response
886
+ status_code = http_response.status
887
+ response_content = http_response.body
888
+ unless status_code == 200
889
+ error_model = JSON.load(response_content)
890
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
891
+ end
892
+
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?
896
+ # Deserialize Response
897
+ if status_code == 200
898
+ begin
899
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
900
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::WorkspaceListResult.mapper()
901
+ result.body = @client.deserialize(result_mapper, parsed_response)
902
+ rescue Exception => e
903
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
904
+ end
905
+ end
906
+
907
+ result
908
+ end
909
+
910
+ promise.execute
911
+ end
912
+
913
+ #
914
+ # Lists all the available machine learning workspaces under the specified
915
+ # subscription.
916
+ #
917
+ # @param next_page_link [String] The NextLink from the previous successful call
918
+ # to List operation.
919
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
920
+ # will be added to the HTTP request.
921
+ #
922
+ # @return [WorkspaceListResult] operation results.
923
+ #
924
+ def list_by_subscription_next(next_page_link, custom_headers:nil)
925
+ response = list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
926
+ response.body unless response.nil?
927
+ end
928
+
929
+ #
930
+ # Lists all the available machine learning workspaces under the specified
931
+ # subscription.
932
+ #
933
+ # @param next_page_link [String] The NextLink from the previous successful call
934
+ # to List operation.
935
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
936
+ # will be added to the HTTP request.
937
+ #
938
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
939
+ #
940
+ def list_by_subscription_next_with_http_info(next_page_link, custom_headers:nil)
941
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
942
+ end
943
+
944
+ #
945
+ # Lists all the available machine learning workspaces under the specified
946
+ # subscription.
947
+ #
948
+ # @param next_page_link [String] The NextLink from the previous successful call
949
+ # to List operation.
950
+ # @param [Hash{String => String}] A hash of custom headers that will be added
951
+ # to the HTTP request.
952
+ #
953
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
954
+ #
955
+ def list_by_subscription_next_async(next_page_link, custom_headers:nil)
956
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
957
+
958
+
959
+ request_headers = {}
960
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
961
+
962
+ # Set Headers
963
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
964
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
965
+ path_template = '{nextLink}'
966
+
967
+ request_url = @base_url || @client.base_url
968
+
969
+ options = {
970
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
971
+ skip_encoding_path_params: {'nextLink' => next_page_link},
972
+ headers: request_headers.merge(custom_headers || {}),
973
+ base_url: request_url
974
+ }
975
+ promise = @client.make_request_async(:get, path_template, options)
976
+
977
+ promise = promise.then do |result|
978
+ http_response = result.response
979
+ status_code = http_response.status
980
+ response_content = http_response.body
981
+ unless status_code == 200
982
+ error_model = JSON.load(response_content)
983
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
984
+ end
985
+
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?
989
+ # Deserialize Response
990
+ if status_code == 200
991
+ begin
992
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
993
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2019_05_01::Models::WorkspaceListResult.mapper()
994
+ result.body = @client.deserialize(result_mapper, parsed_response)
995
+ rescue Exception => e
996
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
997
+ end
998
+ end
999
+
1000
+ result
1001
+ end
1002
+
1003
+ promise.execute
1004
+ end
1005
+
1006
+ #
1007
+ # Lists all the available machine learning workspaces under the specified
1008
+ # resource group.
1009
+ #
1010
+ # @param resource_group_name [String] Name of the resource group in which
1011
+ # workspace is located.
1012
+ # @param skiptoken [String] Continuation token for pagination.
1013
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1014
+ # will be added to the HTTP request.
1015
+ #
1016
+ # @return [WorkspaceListResult] which provide lazy access to pages of the
1017
+ # response.
1018
+ #
1019
+ def list_by_resource_group_as_lazy(resource_group_name, skiptoken:nil, custom_headers:nil)
1020
+ response = list_by_resource_group_async(resource_group_name, skiptoken:skiptoken, custom_headers:custom_headers).value!
1021
+ unless response.nil?
1022
+ page = response.body
1023
+ page.next_method = Proc.new do |next_page_link|
1024
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1025
+ end
1026
+ page
1027
+ end
1028
+ end
1029
+
1030
+ #
1031
+ # Lists all the available machine learning workspaces under the specified
1032
+ # subscription.
1033
+ #
1034
+ # @param skiptoken [String] Continuation token for pagination.
1035
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1036
+ # will be added to the HTTP request.
1037
+ #
1038
+ # @return [WorkspaceListResult] which provide lazy access to pages of the
1039
+ # response.
1040
+ #
1041
+ def list_by_subscription_as_lazy(skiptoken:nil, custom_headers:nil)
1042
+ response = list_by_subscription_async(skiptoken:skiptoken, custom_headers:custom_headers).value!
1043
+ unless response.nil?
1044
+ page = response.body
1045
+ page.next_method = Proc.new do |next_page_link|
1046
+ list_by_subscription_next_async(next_page_link, custom_headers:custom_headers)
1047
+ end
1048
+ page
1049
+ end
1050
+ end
1051
+
1052
+ end
1053
+ end