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,101 @@
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
+ module Models
8
+ #
9
+ # The result of a request to list machine learning workspaces.
10
+ #
11
+ class WorkspaceListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<Workspace>] The list of machine learning workspaces.
17
+ # Since this list may be incomplete, the nextLink field should be used to
18
+ # request the next list of machine learning workspaces.
19
+ attr_accessor :value
20
+
21
+ # @return [String] The URI that can be used to request the next list of
22
+ # machine learning workspaces.
23
+ attr_accessor :next_link
24
+
25
+ # return [Proc] with next page method call.
26
+ attr_accessor :next_method
27
+
28
+ #
29
+ # Gets the rest of the items for the request, enabling auto-pagination.
30
+ #
31
+ # @return [Array<Workspace>] operation results.
32
+ #
33
+ def get_all_items
34
+ items = @value
35
+ page = self
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
+ page = page.get_next_page
38
+ items.concat(page.value)
39
+ end
40
+ items
41
+ end
42
+
43
+ #
44
+ # Gets the next page of results.
45
+ #
46
+ # @return [WorkspaceListResult] with next page content.
47
+ #
48
+ def get_next_page
49
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
50
+ unless response.nil?
51
+ @next_link = response.body.next_link
52
+ @value = response.body.value
53
+ self
54
+ end
55
+ end
56
+
57
+ #
58
+ # Mapper for WorkspaceListResult class as Ruby Hash.
59
+ # This will be used for serialization/deserialization.
60
+ #
61
+ def self.mapper()
62
+ {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'WorkspaceListResult',
66
+ type: {
67
+ name: 'Composite',
68
+ class_name: 'WorkspaceListResult',
69
+ model_properties: {
70
+ value: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'value',
74
+ type: {
75
+ name: 'Sequence',
76
+ element: {
77
+ client_side_validation: true,
78
+ required: false,
79
+ serialized_name: 'WorkspaceElementType',
80
+ type: {
81
+ name: 'Composite',
82
+ class_name: 'Workspace'
83
+ }
84
+ }
85
+ }
86
+ },
87
+ next_link: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ serialized_name: 'nextLink',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,77 @@
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
+ module Models
8
+ #
9
+ # The parameters for updating a machine learning workspace.
10
+ #
11
+ class WorkspaceUpdateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] The resource tags for the machine
16
+ # learning workspace.
17
+ attr_accessor :tags
18
+
19
+ # @return [String] The description of this workspace.
20
+ attr_accessor :description
21
+
22
+ # @return [String] The friendly name for this workspace.
23
+ attr_accessor :friendly_name
24
+
25
+
26
+ #
27
+ # Mapper for WorkspaceUpdateParameters class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'WorkspaceUpdateParameters',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'WorkspaceUpdateParameters',
38
+ model_properties: {
39
+ tags: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'tags',
43
+ type: {
44
+ name: 'Dictionary',
45
+ value: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'StringElementType',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ },
55
+ description: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ serialized_name: 'properties.description',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ friendly_name: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'properties.friendlyName',
67
+ type: {
68
+ name: 'String'
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ end
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::MachineLearningServices end
8
+ module Azure::MachineLearningServices::Mgmt end
9
+ module Azure::MachineLearningServices::Mgmt::V2018_11_19 end
@@ -0,0 +1,113 @@
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 Operations
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Operations 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
+ # Lists all of the available Azure Machine Learning Workspaces REST API
27
+ # operations.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [OperationListResult] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ response = list_async(custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Lists all of the available Azure Machine Learning Workspaces REST API
41
+ # operations.
42
+ #
43
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
44
+ # will be added to the HTTP request.
45
+ #
46
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
47
+ #
48
+ def list_with_http_info(custom_headers:nil)
49
+ list_async(custom_headers:custom_headers).value!
50
+ end
51
+
52
+ #
53
+ # Lists all of the available Azure Machine Learning Workspaces REST API
54
+ # operations.
55
+ #
56
+ # @param [Hash{String => String}] A hash of custom headers that will be added
57
+ # to the HTTP request.
58
+ #
59
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
60
+ #
61
+ def list_async(custom_headers:nil)
62
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
63
+
64
+
65
+ request_headers = {}
66
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
67
+
68
+ # Set Headers
69
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
70
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
71
+ path_template = 'providers/Microsoft.MachineLearningServices/operations'
72
+
73
+ request_url = @base_url || @client.base_url
74
+
75
+ options = {
76
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
77
+ query_params: {'api-version' => @client.api_version},
78
+ headers: request_headers.merge(custom_headers || {}),
79
+ base_url: request_url
80
+ }
81
+ promise = @client.make_request_async(:get, path_template, options)
82
+
83
+ promise = promise.then do |result|
84
+ http_response = result.response
85
+ status_code = http_response.status
86
+ response_content = http_response.body
87
+ unless status_code == 200
88
+ error_model = JSON.load(response_content)
89
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
90
+ end
91
+
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?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::OperationListResult.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ end
113
+ end
@@ -0,0 +1,235 @@
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 Usages
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Usages 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 current usage information as well as limits for AML resources for
27
+ # given subscription and location.
28
+ #
29
+ # @param location [String] The location for which resource usage is queried.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<Usage>] operation results.
34
+ #
35
+ def list(location, custom_headers:nil)
36
+ first_page = list_as_lazy(location, custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Gets the current usage information as well as limits for AML resources for
42
+ # given subscription and location.
43
+ #
44
+ # @param location [String] The location for which resource usage is queried.
45
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
46
+ # will be added to the HTTP request.
47
+ #
48
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
49
+ #
50
+ def list_with_http_info(location, custom_headers:nil)
51
+ list_async(location, custom_headers:custom_headers).value!
52
+ end
53
+
54
+ #
55
+ # Gets the current usage information as well as limits for AML resources for
56
+ # given subscription and location.
57
+ #
58
+ # @param location [String] The location for which resource usage is queried.
59
+ # @param [Hash{String => String}] A hash of custom headers that will be added
60
+ # to the HTTP request.
61
+ #
62
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
63
+ #
64
+ def list_async(location, custom_headers:nil)
65
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
66
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
67
+ fail ArgumentError, 'location is nil' if location.nil?
68
+ fail ArgumentError, "'location' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !location.nil? && location.match(Regexp.new('^^[-\w\._]+$$')).nil?
69
+
70
+
71
+ request_headers = {}
72
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
73
+
74
+ # Set Headers
75
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
76
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
77
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages'
78
+
79
+ request_url = @base_url || @client.base_url
80
+
81
+ options = {
82
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
83
+ path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
84
+ query_params: {'api-version' => @client.api_version},
85
+ headers: request_headers.merge(custom_headers || {}),
86
+ base_url: request_url
87
+ }
88
+ promise = @client.make_request_async(:get, path_template, options)
89
+
90
+ promise = promise.then do |result|
91
+ http_response = result.response
92
+ status_code = http_response.status
93
+ response_content = http_response.body
94
+ unless status_code == 200
95
+ error_model = JSON.load(response_content)
96
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
97
+ end
98
+
99
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
100
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
101
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
102
+ # Deserialize Response
103
+ if status_code == 200
104
+ begin
105
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
106
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ListUsagesResult.mapper()
107
+ result.body = @client.deserialize(result_mapper, parsed_response)
108
+ rescue Exception => e
109
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
110
+ end
111
+ end
112
+
113
+ result
114
+ end
115
+
116
+ promise.execute
117
+ end
118
+
119
+ #
120
+ # Gets the current usage information as well as limits for AML resources for
121
+ # given subscription and location.
122
+ #
123
+ # @param next_page_link [String] The NextLink from the previous successful call
124
+ # to List operation.
125
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
126
+ # will be added to the HTTP request.
127
+ #
128
+ # @return [ListUsagesResult] operation results.
129
+ #
130
+ def list_next(next_page_link, custom_headers:nil)
131
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
132
+ response.body unless response.nil?
133
+ end
134
+
135
+ #
136
+ # Gets the current usage information as well as limits for AML resources for
137
+ # given subscription and location.
138
+ #
139
+ # @param next_page_link [String] The NextLink from the previous successful call
140
+ # to List operation.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
145
+ #
146
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
147
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
148
+ end
149
+
150
+ #
151
+ # Gets the current usage information as well as limits for AML resources for
152
+ # given subscription and location.
153
+ #
154
+ # @param next_page_link [String] The NextLink from the previous successful call
155
+ # to List operation.
156
+ # @param [Hash{String => String}] A hash of custom headers that will be added
157
+ # to the HTTP request.
158
+ #
159
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
160
+ #
161
+ def list_next_async(next_page_link, custom_headers:nil)
162
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
163
+
164
+
165
+ request_headers = {}
166
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
167
+
168
+ # Set Headers
169
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
170
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
171
+ path_template = '{nextLink}'
172
+
173
+ request_url = @base_url || @client.base_url
174
+
175
+ options = {
176
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
177
+ skip_encoding_path_params: {'nextLink' => next_page_link},
178
+ headers: request_headers.merge(custom_headers || {}),
179
+ base_url: request_url
180
+ }
181
+ promise = @client.make_request_async(:get, path_template, options)
182
+
183
+ promise = promise.then do |result|
184
+ http_response = result.response
185
+ status_code = http_response.status
186
+ response_content = http_response.body
187
+ unless status_code == 200
188
+ error_model = JSON.load(response_content)
189
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
190
+ end
191
+
192
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
193
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
194
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
195
+ # Deserialize Response
196
+ if status_code == 200
197
+ begin
198
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
199
+ result_mapper = Azure::MachineLearningServices::Mgmt::V2018_11_19::Models::ListUsagesResult.mapper()
200
+ result.body = @client.deserialize(result_mapper, parsed_response)
201
+ rescue Exception => e
202
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
203
+ end
204
+ end
205
+
206
+ result
207
+ end
208
+
209
+ promise.execute
210
+ end
211
+
212
+ #
213
+ # Gets the current usage information as well as limits for AML resources for
214
+ # given subscription and location.
215
+ #
216
+ # @param location [String] The location for which resource usage is queried.
217
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
218
+ # will be added to the HTTP request.
219
+ #
220
+ # @return [ListUsagesResult] which provide lazy access to pages of the
221
+ # response.
222
+ #
223
+ def list_as_lazy(location, custom_headers:nil)
224
+ response = list_async(location, custom_headers:custom_headers).value!
225
+ unless response.nil?
226
+ page = response.body
227
+ page.next_method = Proc.new do |next_page_link|
228
+ list_next_async(next_page_link, custom_headers:custom_headers)
229
+ end
230
+ page
231
+ end
232
+ end
233
+
234
+ end
235
+ end