azure_mgmt_datalake_analytics 0.15.2 → 0.17.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/account.rb +174 -160
  3. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +10 -6
  4. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb +1 -1
  5. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +1 -1
  6. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb +1 -1
  7. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/list_blob_containers_result.rb +1 -1
  8. data/lib/2015-10-01-preview/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb +1 -1
  9. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics.rb +43 -25
  10. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/{account.rb → accounts.rb} +298 -222
  11. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/compute_policies.rb +176 -206
  12. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +28 -16
  13. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb +180 -203
  14. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/firewall_rules.rb +171 -201
  15. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/locations.rb +116 -0
  16. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb +2 -2
  17. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_with_account_parameters.rb +58 -0
  18. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb +3 -4
  19. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/add_storage_account_with_account_parameters.rb +70 -0
  20. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/capability_information.rb +100 -0
  21. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/check_name_availability_parameters.rb +62 -0
  22. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/compute_policy.rb +22 -5
  23. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/compute_policy_list_result.rb +3 -3
  24. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{compute_policy_account_create_parameters.rb → create_compute_policy_with_account_parameters.rb} +7 -6
  25. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/create_data_lake_analytics_account_parameters.rb +285 -0
  26. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/create_firewall_rule_with_account_parameters.rb +71 -0
  27. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{compute_policy_create_or_update_parameters.rb → create_or_update_compute_policy_parameters.rb} +4 -4
  28. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/create_or_update_firewall_rule_parameters.rb +59 -0
  29. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb +161 -147
  30. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_basic.rb +21 -19
  31. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +5 -5
  32. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{data_lake_store_account_info.rb → data_lake_store_account_information.rb} +8 -6
  33. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{data_lake_analytics_account_list_data_lake_store_result.rb → data_lake_store_account_information_list_result.rb} +15 -15
  34. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/firewall_rule.rb +9 -6
  35. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{data_lake_analytics_firewall_rule_list_result.rb → firewall_rule_list_result.rb} +8 -9
  36. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/name_availability_information.rb +74 -0
  37. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{optional_sub_resource.rb → operation.rb} +21 -19
  38. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/operation_display.rb +83 -0
  39. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/operation_list_result.rb +68 -0
  40. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/operation_origin.rb +17 -0
  41. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/resource.rb +18 -7
  42. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{sas_token_info.rb → sas_token_information.rb} +5 -5
  43. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{list_sas_tokens_result.rb → sas_token_information_list_result.rb} +11 -11
  44. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{storage_account_info.rb → storage_account_information.rb} +8 -18
  45. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{data_lake_analytics_account_list_storage_accounts_result.rb → storage_account_information_list_result.rb} +13 -14
  46. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/storage_container.rb +2 -11
  47. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{list_storage_containers_result.rb → storage_container_list_result.rb} +8 -8
  48. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/sub_resource.rb +6 -5
  49. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/subscription_state.rb +19 -0
  50. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_compute_policy_parameters.rb +91 -0
  51. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_compute_policy_with_account_parameters.rb +103 -0
  52. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/{data_lake_analytics_account_update_parameters.rb → update_data_lake_analytics_account_parameters.rb} +120 -77
  53. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_data_lake_store_with_account_parameters.rb +59 -0
  54. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_parameters.rb +3 -3
  55. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_firewall_rule_with_account_parameters.rb +71 -0
  56. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_storage_account_parameters.rb +3 -4
  57. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/update_storage_account_with_account_parameters.rb +72 -0
  58. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/operations.rb +107 -0
  59. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/storage_accounts.rb +416 -464
  60. data/lib/profiles/latest/datalakeanalytics_latest_profile_client.rb +28 -9
  61. data/lib/profiles/latest/datalakeanalytics_module_definition.rb +0 -1
  62. data/lib/profiles/latest/modules/datalakeanalytics_profile_module.rb +222 -135
  63. data/lib/version.rb +1 -1
  64. metadata +37 -19
  65. data/lib/2016-11-01/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties_basic.rb +0 -115
@@ -22,106 +22,72 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
22
22
  attr_reader :client
23
23
 
24
24
  #
25
- # Creates or updates the specified compute policy. During update, the compute
26
- # policy with the specified name will be replaced with this new compute policy.
27
- # An account supports, at most, 50 policies
25
+ # Lists the Data Lake Analytics compute policies within the specified Data Lake
26
+ # Analytics account. An account supports, at most, 50 policies
28
27
  #
29
- # @param resource_group_name [String] The name of the Azure resource group that
30
- # contains the Data Lake Analytics account.
31
- # @param account_name [String] The name of the Data Lake Analytics account to
32
- # add or replace the compute policy.
33
- # @param compute_policy_name [String] The name of the compute policy to create
34
- # or update.
35
- # @param parameters [ComputePolicyCreateOrUpdateParameters] Parameters supplied
36
- # to create or update the compute policy. The max degree of parallelism per job
37
- # property, min priority per job property, or both must be present.
28
+ # @param resource_group_name [String] The name of the Azure resource group.
29
+ # @param account_name [String] The name of the Data Lake Analytics account.
38
30
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
31
  # will be added to the HTTP request.
40
32
  #
41
- # @return [ComputePolicy] operation results.
33
+ # @return [Array<ComputePolicy>] operation results.
42
34
  #
43
- def create_or_update(resource_group_name, account_name, compute_policy_name, parameters, custom_headers = nil)
44
- response = create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers).value!
45
- response.body unless response.nil?
35
+ def list_by_account(resource_group_name, account_name, custom_headers:nil)
36
+ first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
37
+ first_page.get_all_items
46
38
  end
47
39
 
48
40
  #
49
- # Creates or updates the specified compute policy. During update, the compute
50
- # policy with the specified name will be replaced with this new compute policy.
51
- # An account supports, at most, 50 policies
41
+ # Lists the Data Lake Analytics compute policies within the specified Data Lake
42
+ # Analytics account. An account supports, at most, 50 policies
52
43
  #
53
- # @param resource_group_name [String] The name of the Azure resource group that
54
- # contains the Data Lake Analytics account.
55
- # @param account_name [String] The name of the Data Lake Analytics account to
56
- # add or replace the compute policy.
57
- # @param compute_policy_name [String] The name of the compute policy to create
58
- # or update.
59
- # @param parameters [ComputePolicyCreateOrUpdateParameters] Parameters supplied
60
- # to create or update the compute policy. The max degree of parallelism per job
61
- # property, min priority per job property, or both must be present.
44
+ # @param resource_group_name [String] The name of the Azure resource group.
45
+ # @param account_name [String] The name of the Data Lake Analytics account.
62
46
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
63
47
  # will be added to the HTTP request.
64
48
  #
65
49
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
66
50
  #
67
- def create_or_update_with_http_info(resource_group_name, account_name, compute_policy_name, parameters, custom_headers = nil)
68
- create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers).value!
51
+ def list_by_account_with_http_info(resource_group_name, account_name, custom_headers:nil)
52
+ list_by_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
69
53
  end
70
54
 
71
55
  #
72
- # Creates or updates the specified compute policy. During update, the compute
73
- # policy with the specified name will be replaced with this new compute policy.
74
- # An account supports, at most, 50 policies
56
+ # Lists the Data Lake Analytics compute policies within the specified Data Lake
57
+ # Analytics account. An account supports, at most, 50 policies
75
58
  #
76
- # @param resource_group_name [String] The name of the Azure resource group that
77
- # contains the Data Lake Analytics account.
78
- # @param account_name [String] The name of the Data Lake Analytics account to
79
- # add or replace the compute policy.
80
- # @param compute_policy_name [String] The name of the compute policy to create
81
- # or update.
82
- # @param parameters [ComputePolicyCreateOrUpdateParameters] Parameters supplied
83
- # to create or update the compute policy. The max degree of parallelism per job
84
- # property, min priority per job property, or both must be present.
59
+ # @param resource_group_name [String] The name of the Azure resource group.
60
+ # @param account_name [String] The name of the Data Lake Analytics account.
85
61
  # @param [Hash{String => String}] A hash of custom headers that will be added
86
62
  # to the HTTP request.
87
63
  #
88
64
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
89
65
  #
90
- def create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers = nil)
66
+ def list_by_account_async(resource_group_name, account_name, custom_headers:nil)
67
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
91
68
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
92
69
  fail ArgumentError, 'account_name is nil' if account_name.nil?
93
- fail ArgumentError, 'compute_policy_name is nil' if compute_policy_name.nil?
94
- fail ArgumentError, 'parameters is nil' if parameters.nil?
95
70
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
96
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
97
71
 
98
72
 
99
73
  request_headers = {}
74
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
100
75
 
101
76
  # Set Headers
102
77
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
103
78
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
104
-
105
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
106
-
107
- # Serialize Request
108
- request_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::ComputePolicyCreateOrUpdateParameters.mapper()
109
- request_content = @client.serialize(request_mapper, parameters)
110
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
111
-
112
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'
79
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies'
113
80
 
114
81
  request_url = @base_url || @client.base_url
115
82
 
116
83
  options = {
117
84
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
118
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name,'subscriptionId' => @client.subscription_id},
85
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
119
86
  query_params: {'api-version' => @client.api_version},
120
- body: request_content,
121
87
  headers: request_headers.merge(custom_headers || {}),
122
88
  base_url: request_url
123
89
  }
124
- promise = @client.make_request_async(:put, path_template, options)
90
+ promise = @client.make_request_async(:get, path_template, options)
125
91
 
126
92
  promise = promise.then do |result|
127
93
  http_response = result.response
@@ -137,7 +103,7 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
137
103
  if status_code == 200
138
104
  begin
139
105
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
140
- result_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::ComputePolicy.mapper()
106
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::ComputePolicyListResult.mapper()
141
107
  result.body = @client.deserialize(result_mapper, parsed_response)
142
108
  rescue Exception => e
143
109
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -151,77 +117,83 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
151
117
  end
152
118
 
153
119
  #
154
- # Updates the specified compute policy.
120
+ # Creates or updates the specified compute policy. During update, the compute
121
+ # policy with the specified name will be replaced with this new compute policy.
122
+ # An account supports, at most, 50 policies
155
123
  #
156
- # @param resource_group_name [String] The name of the Azure resource group that
157
- # contains the Data Lake Analytics account.
158
- # @param account_name [String] The name of the Data Lake Analytics account to
159
- # which to update the compute policy.
160
- # @param compute_policy_name [String] The name of the compute policy to update.
161
- # @param parameters [ComputePolicy] Parameters supplied to update the compute
162
- # policy.
124
+ # @param resource_group_name [String] The name of the Azure resource group.
125
+ # @param account_name [String] The name of the Data Lake Analytics account.
126
+ # @param compute_policy_name [String] The name of the compute policy to create
127
+ # or update.
128
+ # @param parameters [CreateOrUpdateComputePolicyParameters] Parameters supplied
129
+ # to create or update the compute policy. The max degree of parallelism per job
130
+ # property, min priority per job property, or both must be present.
163
131
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
164
132
  # will be added to the HTTP request.
165
133
  #
166
134
  # @return [ComputePolicy] operation results.
167
135
  #
168
- def update(resource_group_name, account_name, compute_policy_name, parameters = nil, custom_headers = nil)
169
- response = update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers).value!
136
+ def create_or_update(resource_group_name, account_name, compute_policy_name, parameters, custom_headers:nil)
137
+ response = create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers:custom_headers).value!
170
138
  response.body unless response.nil?
171
139
  end
172
140
 
173
141
  #
174
- # Updates the specified compute policy.
142
+ # Creates or updates the specified compute policy. During update, the compute
143
+ # policy with the specified name will be replaced with this new compute policy.
144
+ # An account supports, at most, 50 policies
175
145
  #
176
- # @param resource_group_name [String] The name of the Azure resource group that
177
- # contains the Data Lake Analytics account.
178
- # @param account_name [String] The name of the Data Lake Analytics account to
179
- # which to update the compute policy.
180
- # @param compute_policy_name [String] The name of the compute policy to update.
181
- # @param parameters [ComputePolicy] Parameters supplied to update the compute
182
- # policy.
146
+ # @param resource_group_name [String] The name of the Azure resource group.
147
+ # @param account_name [String] The name of the Data Lake Analytics account.
148
+ # @param compute_policy_name [String] The name of the compute policy to create
149
+ # or update.
150
+ # @param parameters [CreateOrUpdateComputePolicyParameters] Parameters supplied
151
+ # to create or update the compute policy. The max degree of parallelism per job
152
+ # property, min priority per job property, or both must be present.
183
153
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
184
154
  # will be added to the HTTP request.
185
155
  #
186
156
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
187
157
  #
188
- def update_with_http_info(resource_group_name, account_name, compute_policy_name, parameters = nil, custom_headers = nil)
189
- update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers).value!
158
+ def create_or_update_with_http_info(resource_group_name, account_name, compute_policy_name, parameters, custom_headers:nil)
159
+ create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers:custom_headers).value!
190
160
  end
191
161
 
192
162
  #
193
- # Updates the specified compute policy.
163
+ # Creates or updates the specified compute policy. During update, the compute
164
+ # policy with the specified name will be replaced with this new compute policy.
165
+ # An account supports, at most, 50 policies
194
166
  #
195
- # @param resource_group_name [String] The name of the Azure resource group that
196
- # contains the Data Lake Analytics account.
197
- # @param account_name [String] The name of the Data Lake Analytics account to
198
- # which to update the compute policy.
199
- # @param compute_policy_name [String] The name of the compute policy to update.
200
- # @param parameters [ComputePolicy] Parameters supplied to update the compute
201
- # policy.
167
+ # @param resource_group_name [String] The name of the Azure resource group.
168
+ # @param account_name [String] The name of the Data Lake Analytics account.
169
+ # @param compute_policy_name [String] The name of the compute policy to create
170
+ # or update.
171
+ # @param parameters [CreateOrUpdateComputePolicyParameters] Parameters supplied
172
+ # to create or update the compute policy. The max degree of parallelism per job
173
+ # property, min priority per job property, or both must be present.
202
174
  # @param [Hash{String => String}] A hash of custom headers that will be added
203
175
  # to the HTTP request.
204
176
  #
205
177
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
206
178
  #
207
- def update_async(resource_group_name, account_name, compute_policy_name, parameters = nil, custom_headers = nil)
179
+ def create_or_update_async(resource_group_name, account_name, compute_policy_name, parameters, custom_headers:nil)
180
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
208
181
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
209
182
  fail ArgumentError, 'account_name is nil' if account_name.nil?
210
183
  fail ArgumentError, 'compute_policy_name is nil' if compute_policy_name.nil?
184
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
211
185
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
212
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
213
186
 
214
187
 
215
188
  request_headers = {}
189
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
216
190
 
217
191
  # Set Headers
218
192
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
219
193
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
220
194
 
221
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
222
-
223
195
  # Serialize Request
224
- request_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::ComputePolicy.mapper()
196
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::CreateOrUpdateComputePolicyParameters.mapper()
225
197
  request_content = @client.serialize(request_mapper, parameters)
226
198
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
227
199
 
@@ -231,13 +203,13 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
231
203
 
232
204
  options = {
233
205
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
234
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name,'subscriptionId' => @client.subscription_id},
206
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name},
235
207
  query_params: {'api-version' => @client.api_version},
236
208
  body: request_content,
237
209
  headers: request_headers.merge(custom_headers || {}),
238
210
  base_url: request_url
239
211
  }
240
- promise = @client.make_request_async(:patch, path_template, options)
212
+ promise = @client.make_request_async(:put, path_template, options)
241
213
 
242
214
  promise = promise.then do |result|
243
215
  http_response = result.response
@@ -267,64 +239,60 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
267
239
  end
268
240
 
269
241
  #
270
- # Deletes the specified compute policy from the specified Data Lake Analytics
271
- # account
242
+ # Gets the specified Data Lake Analytics compute policy.
272
243
  #
273
- # @param resource_group_name [String] The name of the Azure resource group that
274
- # contains the Data Lake Analytics account.
275
- # @param account_name [String] The name of the Data Lake Analytics account from
276
- # which to delete the compute policy.
277
- # @param compute_policy_name [String] The name of the compute policy to delete.
244
+ # @param resource_group_name [String] The name of the Azure resource group.
245
+ # @param account_name [String] The name of the Data Lake Analytics account.
246
+ # @param compute_policy_name [String] The name of the compute policy to
247
+ # retrieve.
278
248
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
279
249
  # will be added to the HTTP request.
280
250
  #
251
+ # @return [ComputePolicy] operation results.
281
252
  #
282
- def delete(resource_group_name, account_name, compute_policy_name, custom_headers = nil)
283
- response = delete_async(resource_group_name, account_name, compute_policy_name, custom_headers).value!
284
- nil
253
+ def get(resource_group_name, account_name, compute_policy_name, custom_headers:nil)
254
+ response = get_async(resource_group_name, account_name, compute_policy_name, custom_headers:custom_headers).value!
255
+ response.body unless response.nil?
285
256
  end
286
257
 
287
258
  #
288
- # Deletes the specified compute policy from the specified Data Lake Analytics
289
- # account
259
+ # Gets the specified Data Lake Analytics compute policy.
290
260
  #
291
- # @param resource_group_name [String] The name of the Azure resource group that
292
- # contains the Data Lake Analytics account.
293
- # @param account_name [String] The name of the Data Lake Analytics account from
294
- # which to delete the compute policy.
295
- # @param compute_policy_name [String] The name of the compute policy to delete.
261
+ # @param resource_group_name [String] The name of the Azure resource group.
262
+ # @param account_name [String] The name of the Data Lake Analytics account.
263
+ # @param compute_policy_name [String] The name of the compute policy to
264
+ # retrieve.
296
265
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
266
  # will be added to the HTTP request.
298
267
  #
299
268
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
300
269
  #
301
- def delete_with_http_info(resource_group_name, account_name, compute_policy_name, custom_headers = nil)
302
- delete_async(resource_group_name, account_name, compute_policy_name, custom_headers).value!
270
+ def get_with_http_info(resource_group_name, account_name, compute_policy_name, custom_headers:nil)
271
+ get_async(resource_group_name, account_name, compute_policy_name, custom_headers:custom_headers).value!
303
272
  end
304
273
 
305
274
  #
306
- # Deletes the specified compute policy from the specified Data Lake Analytics
307
- # account
275
+ # Gets the specified Data Lake Analytics compute policy.
308
276
  #
309
- # @param resource_group_name [String] The name of the Azure resource group that
310
- # contains the Data Lake Analytics account.
311
- # @param account_name [String] The name of the Data Lake Analytics account from
312
- # which to delete the compute policy.
313
- # @param compute_policy_name [String] The name of the compute policy to delete.
277
+ # @param resource_group_name [String] The name of the Azure resource group.
278
+ # @param account_name [String] The name of the Data Lake Analytics account.
279
+ # @param compute_policy_name [String] The name of the compute policy to
280
+ # retrieve.
314
281
  # @param [Hash{String => String}] A hash of custom headers that will be added
315
282
  # to the HTTP request.
316
283
  #
317
284
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
318
285
  #
319
- def delete_async(resource_group_name, account_name, compute_policy_name, custom_headers = nil)
286
+ def get_async(resource_group_name, account_name, compute_policy_name, custom_headers:nil)
287
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
320
288
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
321
289
  fail ArgumentError, 'account_name is nil' if account_name.nil?
322
290
  fail ArgumentError, 'compute_policy_name is nil' if compute_policy_name.nil?
323
291
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
324
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
325
292
 
326
293
 
327
294
  request_headers = {}
295
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
328
296
 
329
297
  # Set Headers
330
298
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -335,23 +303,33 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
335
303
 
336
304
  options = {
337
305
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
338
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name,'subscriptionId' => @client.subscription_id},
306
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name},
339
307
  query_params: {'api-version' => @client.api_version},
340
308
  headers: request_headers.merge(custom_headers || {}),
341
309
  base_url: request_url
342
310
  }
343
- promise = @client.make_request_async(:delete, path_template, options)
311
+ promise = @client.make_request_async(:get, path_template, options)
344
312
 
345
313
  promise = promise.then do |result|
346
314
  http_response = result.response
347
315
  status_code = http_response.status
348
316
  response_content = http_response.body
349
- unless status_code == 200 || status_code == 204
317
+ unless status_code == 200
350
318
  error_model = JSON.load(response_content)
351
319
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
352
320
  end
353
321
 
354
322
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
323
+ # Deserialize Response
324
+ if status_code == 200
325
+ begin
326
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
327
+ result_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::ComputePolicy.mapper()
328
+ result.body = @client.deserialize(result_mapper, parsed_response)
329
+ rescue Exception => e
330
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
331
+ end
332
+ end
355
333
 
356
334
  result
357
335
  end
@@ -360,81 +338,86 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
360
338
  end
361
339
 
362
340
  #
363
- # Gets the specified Data Lake Analytics compute policy.
341
+ # Updates the specified compute policy.
364
342
  #
365
- # @param resource_group_name [String] The name of the Azure resource group that
366
- # contains the Data Lake Analytics account.
367
- # @param account_name [String] The name of the Data Lake Analytics account from
368
- # which to get the compute policy.
369
- # @param compute_policy_name [String] The name of the compute policy to
370
- # retrieve.
343
+ # @param resource_group_name [String] The name of the Azure resource group.
344
+ # @param account_name [String] The name of the Data Lake Analytics account.
345
+ # @param compute_policy_name [String] The name of the compute policy to update.
346
+ # @param parameters [UpdateComputePolicyParameters] Parameters supplied to
347
+ # update the compute policy.
371
348
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
372
349
  # will be added to the HTTP request.
373
350
  #
374
351
  # @return [ComputePolicy] operation results.
375
352
  #
376
- def get(resource_group_name, account_name, compute_policy_name, custom_headers = nil)
377
- response = get_async(resource_group_name, account_name, compute_policy_name, custom_headers).value!
353
+ def update(resource_group_name, account_name, compute_policy_name, parameters:nil, custom_headers:nil)
354
+ response = update_async(resource_group_name, account_name, compute_policy_name, parameters:parameters, custom_headers:custom_headers).value!
378
355
  response.body unless response.nil?
379
356
  end
380
357
 
381
358
  #
382
- # Gets the specified Data Lake Analytics compute policy.
359
+ # Updates the specified compute policy.
383
360
  #
384
- # @param resource_group_name [String] The name of the Azure resource group that
385
- # contains the Data Lake Analytics account.
386
- # @param account_name [String] The name of the Data Lake Analytics account from
387
- # which to get the compute policy.
388
- # @param compute_policy_name [String] The name of the compute policy to
389
- # retrieve.
361
+ # @param resource_group_name [String] The name of the Azure resource group.
362
+ # @param account_name [String] The name of the Data Lake Analytics account.
363
+ # @param compute_policy_name [String] The name of the compute policy to update.
364
+ # @param parameters [UpdateComputePolicyParameters] Parameters supplied to
365
+ # update the compute policy.
390
366
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
391
367
  # will be added to the HTTP request.
392
368
  #
393
369
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
394
370
  #
395
- def get_with_http_info(resource_group_name, account_name, compute_policy_name, custom_headers = nil)
396
- get_async(resource_group_name, account_name, compute_policy_name, custom_headers).value!
371
+ def update_with_http_info(resource_group_name, account_name, compute_policy_name, parameters:nil, custom_headers:nil)
372
+ update_async(resource_group_name, account_name, compute_policy_name, parameters:parameters, custom_headers:custom_headers).value!
397
373
  end
398
374
 
399
375
  #
400
- # Gets the specified Data Lake Analytics compute policy.
376
+ # Updates the specified compute policy.
401
377
  #
402
- # @param resource_group_name [String] The name of the Azure resource group that
403
- # contains the Data Lake Analytics account.
404
- # @param account_name [String] The name of the Data Lake Analytics account from
405
- # which to get the compute policy.
406
- # @param compute_policy_name [String] The name of the compute policy to
407
- # retrieve.
378
+ # @param resource_group_name [String] The name of the Azure resource group.
379
+ # @param account_name [String] The name of the Data Lake Analytics account.
380
+ # @param compute_policy_name [String] The name of the compute policy to update.
381
+ # @param parameters [UpdateComputePolicyParameters] Parameters supplied to
382
+ # update the compute policy.
408
383
  # @param [Hash{String => String}] A hash of custom headers that will be added
409
384
  # to the HTTP request.
410
385
  #
411
386
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
412
387
  #
413
- def get_async(resource_group_name, account_name, compute_policy_name, custom_headers = nil)
388
+ def update_async(resource_group_name, account_name, compute_policy_name, parameters:nil, custom_headers:nil)
389
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
414
390
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
415
391
  fail ArgumentError, 'account_name is nil' if account_name.nil?
416
392
  fail ArgumentError, 'compute_policy_name is nil' if compute_policy_name.nil?
417
393
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
418
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
419
394
 
420
395
 
421
396
  request_headers = {}
397
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
422
398
 
423
399
  # Set Headers
424
400
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
425
401
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
402
+
403
+ # Serialize Request
404
+ request_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::UpdateComputePolicyParameters.mapper()
405
+ request_content = @client.serialize(request_mapper, parameters)
406
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
407
+
426
408
  path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'
427
409
 
428
410
  request_url = @base_url || @client.base_url
429
411
 
430
412
  options = {
431
413
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
432
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name,'subscriptionId' => @client.subscription_id},
414
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name},
433
415
  query_params: {'api-version' => @client.api_version},
416
+ body: request_content,
434
417
  headers: request_headers.merge(custom_headers || {}),
435
418
  base_url: request_url
436
419
  }
437
- promise = @client.make_request_async(:get, path_template, options)
420
+ promise = @client.make_request_async(:patch, path_template, options)
438
421
 
439
422
  promise = promise.then do |result|
440
423
  http_response = result.response
@@ -464,98 +447,86 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
464
447
  end
465
448
 
466
449
  #
467
- # Lists the Data Lake Analytics compute policies within the specified Data Lake
468
- # Analytics account. An account supports, at most, 50 policies
450
+ # Deletes the specified compute policy from the specified Data Lake Analytics
451
+ # account
469
452
  #
470
- # @param resource_group_name [String] The name of the Azure resource group that
471
- # contains the Data Lake Analytics account.
472
- # @param account_name [String] The name of the Data Lake Analytics account from
473
- # which to get the compute policies.
453
+ # @param resource_group_name [String] The name of the Azure resource group.
454
+ # @param account_name [String] The name of the Data Lake Analytics account.
455
+ # @param compute_policy_name [String] The name of the compute policy to delete.
474
456
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
475
457
  # will be added to the HTTP request.
476
458
  #
477
- # @return [Array<ComputePolicy>] operation results.
478
459
  #
479
- def list_by_account(resource_group_name, account_name, custom_headers = nil)
480
- first_page = list_by_account_as_lazy(resource_group_name, account_name, custom_headers)
481
- first_page.get_all_items
460
+ def delete(resource_group_name, account_name, compute_policy_name, custom_headers:nil)
461
+ response = delete_async(resource_group_name, account_name, compute_policy_name, custom_headers:custom_headers).value!
462
+ nil
482
463
  end
483
464
 
484
465
  #
485
- # Lists the Data Lake Analytics compute policies within the specified Data Lake
486
- # Analytics account. An account supports, at most, 50 policies
466
+ # Deletes the specified compute policy from the specified Data Lake Analytics
467
+ # account
487
468
  #
488
- # @param resource_group_name [String] The name of the Azure resource group that
489
- # contains the Data Lake Analytics account.
490
- # @param account_name [String] The name of the Data Lake Analytics account from
491
- # which to get the compute policies.
469
+ # @param resource_group_name [String] The name of the Azure resource group.
470
+ # @param account_name [String] The name of the Data Lake Analytics account.
471
+ # @param compute_policy_name [String] The name of the compute policy to delete.
492
472
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
493
473
  # will be added to the HTTP request.
494
474
  #
495
475
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
496
476
  #
497
- def list_by_account_with_http_info(resource_group_name, account_name, custom_headers = nil)
498
- list_by_account_async(resource_group_name, account_name, custom_headers).value!
477
+ def delete_with_http_info(resource_group_name, account_name, compute_policy_name, custom_headers:nil)
478
+ delete_async(resource_group_name, account_name, compute_policy_name, custom_headers:custom_headers).value!
499
479
  end
500
480
 
501
481
  #
502
- # Lists the Data Lake Analytics compute policies within the specified Data Lake
503
- # Analytics account. An account supports, at most, 50 policies
482
+ # Deletes the specified compute policy from the specified Data Lake Analytics
483
+ # account
504
484
  #
505
- # @param resource_group_name [String] The name of the Azure resource group that
506
- # contains the Data Lake Analytics account.
507
- # @param account_name [String] The name of the Data Lake Analytics account from
508
- # which to get the compute policies.
485
+ # @param resource_group_name [String] The name of the Azure resource group.
486
+ # @param account_name [String] The name of the Data Lake Analytics account.
487
+ # @param compute_policy_name [String] The name of the compute policy to delete.
509
488
  # @param [Hash{String => String}] A hash of custom headers that will be added
510
489
  # to the HTTP request.
511
490
  #
512
491
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
513
492
  #
514
- def list_by_account_async(resource_group_name, account_name, custom_headers = nil)
493
+ def delete_async(resource_group_name, account_name, compute_policy_name, custom_headers:nil)
494
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
515
495
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
516
496
  fail ArgumentError, 'account_name is nil' if account_name.nil?
497
+ fail ArgumentError, 'compute_policy_name is nil' if compute_policy_name.nil?
517
498
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
518
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
519
499
 
520
500
 
521
501
  request_headers = {}
502
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
522
503
 
523
504
  # Set Headers
524
505
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
525
506
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
526
- path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies'
507
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}'
527
508
 
528
509
  request_url = @base_url || @client.base_url
529
510
 
530
511
  options = {
531
512
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
532
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
513
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'computePolicyName' => compute_policy_name},
533
514
  query_params: {'api-version' => @client.api_version},
534
515
  headers: request_headers.merge(custom_headers || {}),
535
516
  base_url: request_url
536
517
  }
537
- promise = @client.make_request_async(:get, path_template, options)
518
+ promise = @client.make_request_async(:delete, path_template, options)
538
519
 
539
520
  promise = promise.then do |result|
540
521
  http_response = result.response
541
522
  status_code = http_response.status
542
523
  response_content = http_response.body
543
- unless status_code == 200
524
+ unless status_code == 200 || status_code == 204
544
525
  error_model = JSON.load(response_content)
545
526
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
546
527
  end
547
528
 
548
529
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
549
- # Deserialize Response
550
- if status_code == 200
551
- begin
552
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
553
- result_mapper = Azure::DataLakeAnalytics::Mgmt::V2016_11_01::Models::ComputePolicyListResult.mapper()
554
- result.body = @client.deserialize(result_mapper, parsed_response)
555
- rescue Exception => e
556
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
557
- end
558
- end
559
530
 
560
531
  result
561
532
  end
@@ -574,8 +545,8 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
574
545
  #
575
546
  # @return [ComputePolicyListResult] operation results.
576
547
  #
577
- def list_by_account_next(next_page_link, custom_headers = nil)
578
- response = list_by_account_next_async(next_page_link, custom_headers).value!
548
+ def list_by_account_next(next_page_link, custom_headers:nil)
549
+ response = list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
579
550
  response.body unless response.nil?
580
551
  end
581
552
 
@@ -590,8 +561,8 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
590
561
  #
591
562
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
592
563
  #
593
- def list_by_account_next_with_http_info(next_page_link, custom_headers = nil)
594
- list_by_account_next_async(next_page_link, custom_headers).value!
564
+ def list_by_account_next_with_http_info(next_page_link, custom_headers:nil)
565
+ list_by_account_next_async(next_page_link, custom_headers:custom_headers).value!
595
566
  end
596
567
 
597
568
  #
@@ -605,11 +576,12 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
605
576
  #
606
577
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
607
578
  #
608
- def list_by_account_next_async(next_page_link, custom_headers = nil)
579
+ def list_by_account_next_async(next_page_link, custom_headers:nil)
609
580
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
610
581
 
611
582
 
612
583
  request_headers = {}
584
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
613
585
 
614
586
  # Set Headers
615
587
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -657,22 +629,20 @@ module Azure::DataLakeAnalytics::Mgmt::V2016_11_01
657
629
  # Lists the Data Lake Analytics compute policies within the specified Data Lake
658
630
  # Analytics account. An account supports, at most, 50 policies
659
631
  #
660
- # @param resource_group_name [String] The name of the Azure resource group that
661
- # contains the Data Lake Analytics account.
662
- # @param account_name [String] The name of the Data Lake Analytics account from
663
- # which to get the compute policies.
632
+ # @param resource_group_name [String] The name of the Azure resource group.
633
+ # @param account_name [String] The name of the Data Lake Analytics account.
664
634
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
665
635
  # will be added to the HTTP request.
666
636
  #
667
637
  # @return [ComputePolicyListResult] which provide lazy access to pages of the
668
638
  # response.
669
639
  #
670
- def list_by_account_as_lazy(resource_group_name, account_name, custom_headers = nil)
671
- response = list_by_account_async(resource_group_name, account_name, custom_headers).value!
640
+ def list_by_account_as_lazy(resource_group_name, account_name, custom_headers:nil)
641
+ response = list_by_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
672
642
  unless response.nil?
673
643
  page = response.body
674
644
  page.next_method = Proc.new do |next_page_link|
675
- list_by_account_next_async(next_page_link, custom_headers)
645
+ list_by_account_next_async(next_page_link, custom_headers:custom_headers)
676
646
  end
677
647
  page
678
648
  end