azure_mgmt_datalake_analytics 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_datalake_analytics.rb +14 -15
  3. data/lib/generated/azure_mgmt_datalake_analytics/account.rb +478 -2502
  4. data/lib/generated/azure_mgmt_datalake_analytics/data_lake_analytics_account_management_client.rb +23 -2
  5. data/lib/generated/azure_mgmt_datalake_analytics/data_lake_store_accounts.rb +619 -0
  6. data/lib/generated/azure_mgmt_datalake_analytics/models/add_data_lake_store_parameters.rb +7 -9
  7. data/lib/generated/azure_mgmt_datalake_analytics/models/add_storage_account_parameters.rb +19 -9
  8. data/lib/generated/azure_mgmt_datalake_analytics/models/create_storage_account_info.rb +67 -0
  9. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account.rb +181 -26
  10. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_data_lake_store_result.rb +1 -12
  11. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_result.rb +1 -1
  12. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_list_storage_accounts_result.rb +1 -12
  13. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_state.rb +3 -3
  14. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_status.rb +1 -1
  15. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_update_parameters.rb +94 -0
  16. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info.rb +8 -9
  17. data/lib/generated/azure_mgmt_datalake_analytics/models/error.rb +3 -3
  18. data/lib/generated/azure_mgmt_datalake_analytics/models/error_details.rb +1 -1
  19. data/lib/generated/azure_mgmt_datalake_analytics/models/inner_error.rb +1 -1
  20. data/lib/generated/azure_mgmt_datalake_analytics/models/list_sas_tokens_result.rb +1 -1
  21. data/lib/generated/azure_mgmt_datalake_analytics/models/{list_blob_containers_result.rb → list_storage_containers_result.rb} +10 -10
  22. data/lib/generated/azure_mgmt_datalake_analytics/models/sas_token_info.rb +1 -1
  23. data/lib/generated/azure_mgmt_datalake_analytics/models/storage_account_info.rb +19 -9
  24. data/lib/generated/azure_mgmt_datalake_analytics/models/{blob_container.rb → storage_container.rb} +10 -11
  25. data/lib/generated/azure_mgmt_datalake_analytics/models/{storage_account_properties.rb → update_storage_account_parameters.rb} +13 -12
  26. data/lib/generated/azure_mgmt_datalake_analytics/module_definition.rb +1 -1
  27. data/lib/generated/azure_mgmt_datalake_analytics/storage_accounts.rb +1309 -0
  28. data/lib/generated/azure_mgmt_datalake_analytics/version.rb +2 -2
  29. metadata +11 -12
  30. data/lib/generated/azure_mgmt_datalake_analytics/models/azure_async_operation_result.rb +0 -66
  31. data/lib/generated/azure_mgmt_datalake_analytics/models/blob_container_properties.rb +0 -45
  32. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_analytics_account_properties.rb +0 -167
  33. data/lib/generated/azure_mgmt_datalake_analytics/models/data_lake_store_account_info_properties.rb +0 -44
  34. data/lib/generated/azure_mgmt_datalake_analytics/models/operation_status.rb +0 -17
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -0,0 +1,1309 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::DataLakeAnalytics
7
+ #
8
+ # Creates an Azure Data Lake Analytics account management client.
9
+ #
10
+ class StorageAccounts
11
+ include Azure::ARM::DataLakeAnalytics::Models
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the StorageAccounts class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [DataLakeAnalyticsAccountManagementClient] reference to the DataLakeAnalyticsAccountManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Gets the specified Azure Storage account linked to the given Data Lake
27
+ # Analytics account.
28
+ #
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 from
32
+ # which to retrieve Azure storage account details.
33
+ # @param storage_account_name [String] The name of the Azure Storage account
34
+ # for which to retrieve the details.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [StorageAccountInfo] operation results.
39
+ #
40
+ def get(resource_group_name, account_name, storage_account_name, custom_headers = nil)
41
+ response = get_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Gets the specified Azure Storage account linked to the given Data Lake
47
+ # Analytics account.
48
+ #
49
+ # @param resource_group_name [String] The name of the Azure resource group that
50
+ # contains the Data Lake Analytics account.
51
+ # @param account_name [String] The name of the Data Lake Analytics account from
52
+ # which to retrieve Azure storage account details.
53
+ # @param storage_account_name [String] The name of the Azure Storage account
54
+ # for which to retrieve the details.
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
59
+ #
60
+ def get_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil)
61
+ get_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
62
+ end
63
+
64
+ #
65
+ # Gets the specified Azure Storage account linked to the given Data Lake
66
+ # Analytics account.
67
+ #
68
+ # @param resource_group_name [String] The name of the Azure resource group that
69
+ # contains the Data Lake Analytics account.
70
+ # @param account_name [String] The name of the Data Lake Analytics account from
71
+ # which to retrieve Azure storage account details.
72
+ # @param storage_account_name [String] The name of the Azure Storage account
73
+ # for which to retrieve the details.
74
+ # @param [Hash{String => String}] A hash of custom headers that will be added
75
+ # to the HTTP request.
76
+ #
77
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
78
+ #
79
+ def get_async(resource_group_name, account_name, storage_account_name, custom_headers = nil)
80
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
81
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
82
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
85
+
86
+
87
+ request_headers = {}
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
99
+ query_params: {'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = StorageAccountInfo.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # Updates the specified Data Lake Analytics account to remove an Azure Storage
134
+ # account.
135
+ #
136
+ # @param resource_group_name [String] The name of the Azure resource group that
137
+ # contains the Data Lake Analytics account.
138
+ # @param account_name [String] The name of the Data Lake Analytics account from
139
+ # which to remove the Azure Storage account.
140
+ # @param storage_account_name [String] The name of the Azure Storage account to
141
+ # remove
142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
143
+ # will be added to the HTTP request.
144
+ #
145
+ #
146
+ def delete(resource_group_name, account_name, storage_account_name, custom_headers = nil)
147
+ response = delete_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
148
+ nil
149
+ end
150
+
151
+ #
152
+ # Updates the specified Data Lake Analytics account to remove an Azure Storage
153
+ # account.
154
+ #
155
+ # @param resource_group_name [String] The name of the Azure resource group that
156
+ # contains the Data Lake Analytics account.
157
+ # @param account_name [String] The name of the Data Lake Analytics account from
158
+ # which to remove the Azure Storage account.
159
+ # @param storage_account_name [String] The name of the Azure Storage account to
160
+ # remove
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
165
+ #
166
+ def delete_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil)
167
+ delete_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
168
+ end
169
+
170
+ #
171
+ # Updates the specified Data Lake Analytics account to remove an Azure Storage
172
+ # account.
173
+ #
174
+ # @param resource_group_name [String] The name of the Azure resource group that
175
+ # contains the Data Lake Analytics account.
176
+ # @param account_name [String] The name of the Data Lake Analytics account from
177
+ # which to remove the Azure Storage account.
178
+ # @param storage_account_name [String] The name of the Azure Storage account to
179
+ # remove
180
+ # @param [Hash{String => String}] A hash of custom headers that will be added
181
+ # to the HTTP request.
182
+ #
183
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
184
+ #
185
+ def delete_async(resource_group_name, account_name, storage_account_name, custom_headers = nil)
186
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
187
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
188
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
189
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
190
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
191
+
192
+
193
+ request_headers = {}
194
+
195
+ # Set Headers
196
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
197
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
198
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
199
+
200
+ request_url = @base_url || @client.base_url
201
+
202
+ options = {
203
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
204
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
205
+ query_params: {'api-version' => @client.api_version},
206
+ headers: request_headers.merge(custom_headers || {}),
207
+ base_url: request_url
208
+ }
209
+ promise = @client.make_request_async(:delete, path_template, options)
210
+
211
+ promise = promise.then do |result|
212
+ http_response = result.response
213
+ status_code = http_response.status
214
+ response_content = http_response.body
215
+ unless status_code == 200
216
+ error_model = JSON.load(response_content)
217
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
218
+ end
219
+
220
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
221
+
222
+ result
223
+ end
224
+
225
+ promise.execute
226
+ end
227
+
228
+ #
229
+ # Updates the Data Lake Analytics account to replace Azure Storage blob account
230
+ # details, such as the access key and/or suffix.
231
+ #
232
+ # @param resource_group_name [String] The name of the Azure resource group that
233
+ # contains the Data Lake Analytics account.
234
+ # @param account_name [String] The name of the Data Lake Analytics account to
235
+ # modify storage accounts in
236
+ # @param storage_account_name [String] The Azure Storage account to modify
237
+ # @param parameters [UpdateStorageAccountParameters] The parameters containing
238
+ # the access key and suffix to update the storage account with, if any. Passing
239
+ # nothing results in no change.
240
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
241
+ # will be added to the HTTP request.
242
+ #
243
+ #
244
+ def update(resource_group_name, account_name, storage_account_name, parameters = nil, custom_headers = nil)
245
+ response = update_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
246
+ nil
247
+ end
248
+
249
+ #
250
+ # Updates the Data Lake Analytics account to replace Azure Storage blob account
251
+ # details, such as the access key and/or suffix.
252
+ #
253
+ # @param resource_group_name [String] The name of the Azure resource group that
254
+ # contains the Data Lake Analytics account.
255
+ # @param account_name [String] The name of the Data Lake Analytics account to
256
+ # modify storage accounts in
257
+ # @param storage_account_name [String] The Azure Storage account to modify
258
+ # @param parameters [UpdateStorageAccountParameters] The parameters containing
259
+ # the access key and suffix to update the storage account with, if any. Passing
260
+ # nothing results in no change.
261
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
262
+ # will be added to the HTTP request.
263
+ #
264
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
265
+ #
266
+ def update_with_http_info(resource_group_name, account_name, storage_account_name, parameters = nil, custom_headers = nil)
267
+ update_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
268
+ end
269
+
270
+ #
271
+ # Updates the Data Lake Analytics account to replace Azure Storage blob account
272
+ # details, such as the access key and/or suffix.
273
+ #
274
+ # @param resource_group_name [String] The name of the Azure resource group that
275
+ # contains the Data Lake Analytics account.
276
+ # @param account_name [String] The name of the Data Lake Analytics account to
277
+ # modify storage accounts in
278
+ # @param storage_account_name [String] The Azure Storage account to modify
279
+ # @param parameters [UpdateStorageAccountParameters] The parameters containing
280
+ # the access key and suffix to update the storage account with, if any. Passing
281
+ # nothing results in no change.
282
+ # @param [Hash{String => String}] A hash of custom headers that will be added
283
+ # to the HTTP request.
284
+ #
285
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
286
+ #
287
+ def update_async(resource_group_name, account_name, storage_account_name, parameters = nil, custom_headers = nil)
288
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
289
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
290
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
291
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
292
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
293
+
294
+
295
+ request_headers = {}
296
+
297
+ # Set Headers
298
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
299
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
300
+
301
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
302
+
303
+ # Serialize Request
304
+ request_mapper = UpdateStorageAccountParameters.mapper()
305
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
306
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
307
+
308
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
309
+
310
+ request_url = @base_url || @client.base_url
311
+
312
+ options = {
313
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
314
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
315
+ query_params: {'api-version' => @client.api_version},
316
+ body: request_content,
317
+ headers: request_headers.merge(custom_headers || {}),
318
+ base_url: request_url
319
+ }
320
+ promise = @client.make_request_async(:patch, path_template, options)
321
+
322
+ promise = promise.then do |result|
323
+ http_response = result.response
324
+ status_code = http_response.status
325
+ response_content = http_response.body
326
+ unless status_code == 200
327
+ error_model = JSON.load(response_content)
328
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
329
+ end
330
+
331
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
332
+
333
+ result
334
+ end
335
+
336
+ promise.execute
337
+ end
338
+
339
+ #
340
+ # Updates the specified Data Lake Analytics account to add an Azure Storage
341
+ # account.
342
+ #
343
+ # @param resource_group_name [String] The name of the Azure resource group that
344
+ # contains the Data Lake Analytics account.
345
+ # @param account_name [String] The name of the Data Lake Analytics account to
346
+ # which to add the Azure Storage account.
347
+ # @param storage_account_name [String] The name of the Azure Storage account to
348
+ # add
349
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
350
+ # access key and optional suffix for the Azure Storage Account.
351
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
352
+ # will be added to the HTTP request.
353
+ #
354
+ #
355
+ def add(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
356
+ response = add_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
357
+ nil
358
+ end
359
+
360
+ #
361
+ # Updates the specified Data Lake Analytics account to add an Azure Storage
362
+ # account.
363
+ #
364
+ # @param resource_group_name [String] The name of the Azure resource group that
365
+ # contains the Data Lake Analytics account.
366
+ # @param account_name [String] The name of the Data Lake Analytics account to
367
+ # which to add the Azure Storage account.
368
+ # @param storage_account_name [String] The name of the Azure Storage account to
369
+ # add
370
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
371
+ # access key and optional suffix for the Azure Storage Account.
372
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
373
+ # will be added to the HTTP request.
374
+ #
375
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
376
+ #
377
+ def add_with_http_info(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
378
+ add_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers).value!
379
+ end
380
+
381
+ #
382
+ # Updates the specified Data Lake Analytics account to add an Azure Storage
383
+ # account.
384
+ #
385
+ # @param resource_group_name [String] The name of the Azure resource group that
386
+ # contains the Data Lake Analytics account.
387
+ # @param account_name [String] The name of the Data Lake Analytics account to
388
+ # which to add the Azure Storage account.
389
+ # @param storage_account_name [String] The name of the Azure Storage account to
390
+ # add
391
+ # @param parameters [AddStorageAccountParameters] The parameters containing the
392
+ # access key and optional suffix for the Azure Storage Account.
393
+ # @param [Hash{String => String}] A hash of custom headers that will be added
394
+ # to the HTTP request.
395
+ #
396
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
397
+ #
398
+ def add_async(resource_group_name, account_name, storage_account_name, parameters, custom_headers = nil)
399
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
400
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
401
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
402
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
403
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
404
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
405
+
406
+
407
+ request_headers = {}
408
+
409
+ # Set Headers
410
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
411
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
412
+
413
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
414
+
415
+ # Serialize Request
416
+ request_mapper = AddStorageAccountParameters.mapper()
417
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
418
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
419
+
420
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}'
421
+
422
+ request_url = @base_url || @client.base_url
423
+
424
+ options = {
425
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
426
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
427
+ query_params: {'api-version' => @client.api_version},
428
+ body: request_content,
429
+ headers: request_headers.merge(custom_headers || {}),
430
+ base_url: request_url
431
+ }
432
+ promise = @client.make_request_async(:put, path_template, options)
433
+
434
+ promise = promise.then do |result|
435
+ http_response = result.response
436
+ status_code = http_response.status
437
+ response_content = http_response.body
438
+ unless status_code == 200
439
+ error_model = JSON.load(response_content)
440
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
441
+ end
442
+
443
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
444
+
445
+ result
446
+ end
447
+
448
+ promise.execute
449
+ end
450
+
451
+ #
452
+ # Gets the specified Azure Storage container associated with the given Data
453
+ # Lake Analytics and Azure Storage accounts.
454
+ #
455
+ # @param resource_group_name [String] The name of the Azure resource group that
456
+ # contains the Data Lake Analytics account.
457
+ # @param account_name [String] The name of the Data Lake Analytics account for
458
+ # which to retrieve blob container.
459
+ # @param storage_account_name [String] The name of the Azure storage account
460
+ # from which to retrieve the blob container.
461
+ # @param container_name [String] The name of the Azure storage container to
462
+ # retrieve
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [StorageContainer] operation results.
467
+ #
468
+ def get_storage_container(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
469
+ response = get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
470
+ response.body unless response.nil?
471
+ end
472
+
473
+ #
474
+ # Gets the specified Azure Storage container associated with the given Data
475
+ # Lake Analytics and Azure Storage accounts.
476
+ #
477
+ # @param resource_group_name [String] The name of the Azure resource group that
478
+ # contains the Data Lake Analytics account.
479
+ # @param account_name [String] The name of the Data Lake Analytics account for
480
+ # which to retrieve blob container.
481
+ # @param storage_account_name [String] The name of the Azure storage account
482
+ # from which to retrieve the blob container.
483
+ # @param container_name [String] The name of the Azure storage container to
484
+ # retrieve
485
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
486
+ # will be added to the HTTP request.
487
+ #
488
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
489
+ #
490
+ def get_storage_container_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
491
+ get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
492
+ end
493
+
494
+ #
495
+ # Gets the specified Azure Storage container associated with the given Data
496
+ # Lake Analytics and Azure Storage accounts.
497
+ #
498
+ # @param resource_group_name [String] The name of the Azure resource group that
499
+ # contains the Data Lake Analytics account.
500
+ # @param account_name [String] The name of the Data Lake Analytics account for
501
+ # which to retrieve blob container.
502
+ # @param storage_account_name [String] The name of the Azure storage account
503
+ # from which to retrieve the blob container.
504
+ # @param container_name [String] The name of the Azure storage container to
505
+ # retrieve
506
+ # @param [Hash{String => String}] A hash of custom headers that will be added
507
+ # to the HTTP request.
508
+ #
509
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
510
+ #
511
+ def get_storage_container_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
512
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
513
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
514
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
515
+ fail ArgumentError, 'container_name is nil' if container_name.nil?
516
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
517
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
518
+
519
+
520
+ request_headers = {}
521
+
522
+ # Set Headers
523
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
524
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
525
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}'
526
+
527
+ request_url = @base_url || @client.base_url
528
+
529
+ options = {
530
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
531
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
532
+ query_params: {'api-version' => @client.api_version},
533
+ headers: request_headers.merge(custom_headers || {}),
534
+ base_url: request_url
535
+ }
536
+ promise = @client.make_request_async(:get, path_template, options)
537
+
538
+ promise = promise.then do |result|
539
+ http_response = result.response
540
+ status_code = http_response.status
541
+ response_content = http_response.body
542
+ unless status_code == 200
543
+ error_model = JSON.load(response_content)
544
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
545
+ end
546
+
547
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
548
+ # Deserialize Response
549
+ if status_code == 200
550
+ begin
551
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
552
+ result_mapper = StorageContainer.mapper()
553
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
554
+ rescue Exception => e
555
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
556
+ end
557
+ end
558
+
559
+ result
560
+ end
561
+
562
+ promise.execute
563
+ end
564
+
565
+ #
566
+ # Lists the Azure Storage containers, if any, associated with the specified
567
+ # Data Lake Analytics and Azure Storage account combination. The response
568
+ # includes a link to the next page of results, if any.
569
+ #
570
+ # @param resource_group_name [String] The name of the Azure resource group that
571
+ # contains the Data Lake Analytics account.
572
+ # @param account_name [String] The name of the Data Lake Analytics account for
573
+ # which to list Azure Storage blob containers.
574
+ # @param storage_account_name [String] The name of the Azure storage account
575
+ # from which to list blob containers.
576
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
577
+ # will be added to the HTTP request.
578
+ #
579
+ # @return [Array<StorageContainer>] operation results.
580
+ #
581
+ def list_storage_containers(resource_group_name, account_name, storage_account_name, custom_headers = nil)
582
+ first_page = list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers)
583
+ first_page.get_all_items
584
+ end
585
+
586
+ #
587
+ # Lists the Azure Storage containers, if any, associated with the specified
588
+ # Data Lake Analytics and Azure Storage account combination. The response
589
+ # includes a link to the next page of results, if any.
590
+ #
591
+ # @param resource_group_name [String] The name of the Azure resource group that
592
+ # contains the Data Lake Analytics account.
593
+ # @param account_name [String] The name of the Data Lake Analytics account for
594
+ # which to list Azure Storage blob containers.
595
+ # @param storage_account_name [String] The name of the Azure storage account
596
+ # from which to list blob containers.
597
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
598
+ # will be added to the HTTP request.
599
+ #
600
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
601
+ #
602
+ def list_storage_containers_with_http_info(resource_group_name, account_name, storage_account_name, custom_headers = nil)
603
+ list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
604
+ end
605
+
606
+ #
607
+ # Lists the Azure Storage containers, if any, associated with the specified
608
+ # Data Lake Analytics and Azure Storage account combination. The response
609
+ # includes a link to the next page of results, if any.
610
+ #
611
+ # @param resource_group_name [String] The name of the Azure resource group that
612
+ # contains the Data Lake Analytics account.
613
+ # @param account_name [String] The name of the Data Lake Analytics account for
614
+ # which to list Azure Storage blob containers.
615
+ # @param storage_account_name [String] The name of the Azure storage account
616
+ # from which to list blob containers.
617
+ # @param [Hash{String => String}] A hash of custom headers that will be added
618
+ # to the HTTP request.
619
+ #
620
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
621
+ #
622
+ def list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers = nil)
623
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
624
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
625
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
626
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
627
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
628
+
629
+
630
+ request_headers = {}
631
+
632
+ # Set Headers
633
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
634
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
635
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers'
636
+
637
+ request_url = @base_url || @client.base_url
638
+
639
+ options = {
640
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
641
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'subscriptionId' => @client.subscription_id},
642
+ query_params: {'api-version' => @client.api_version},
643
+ headers: request_headers.merge(custom_headers || {}),
644
+ base_url: request_url
645
+ }
646
+ promise = @client.make_request_async(:get, path_template, options)
647
+
648
+ promise = promise.then do |result|
649
+ http_response = result.response
650
+ status_code = http_response.status
651
+ response_content = http_response.body
652
+ unless status_code == 200
653
+ error_model = JSON.load(response_content)
654
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
655
+ end
656
+
657
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
658
+ # Deserialize Response
659
+ if status_code == 200
660
+ begin
661
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
662
+ result_mapper = ListStorageContainersResult.mapper()
663
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
664
+ rescue Exception => e
665
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
666
+ end
667
+ end
668
+
669
+ result
670
+ end
671
+
672
+ promise.execute
673
+ end
674
+
675
+ #
676
+ # Gets the SAS token associated with the specified Data Lake Analytics and
677
+ # Azure Storage account and container combination.
678
+ #
679
+ # @param resource_group_name [String] The name of the Azure resource group that
680
+ # contains the Data Lake Analytics account.
681
+ # @param account_name [String] The name of the Data Lake Analytics account from
682
+ # which an Azure Storage account's SAS token is being requested.
683
+ # @param storage_account_name [String] The name of the Azure storage account
684
+ # for which the SAS token is being requested.
685
+ # @param container_name [String] The name of the Azure storage container for
686
+ # which the SAS token is being requested.
687
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
688
+ # will be added to the HTTP request.
689
+ #
690
+ # @return [Array<SasTokenInfo>] operation results.
691
+ #
692
+ def list_sas_tokens(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
693
+ first_page = list_sas_tokens_as_lazy(resource_group_name, account_name, storage_account_name, container_name, custom_headers)
694
+ first_page.get_all_items
695
+ end
696
+
697
+ #
698
+ # Gets the SAS token associated with the specified Data Lake Analytics and
699
+ # Azure Storage account and container combination.
700
+ #
701
+ # @param resource_group_name [String] The name of the Azure resource group that
702
+ # contains the Data Lake Analytics account.
703
+ # @param account_name [String] The name of the Data Lake Analytics account from
704
+ # which an Azure Storage account's SAS token is being requested.
705
+ # @param storage_account_name [String] The name of the Azure storage account
706
+ # for which the SAS token is being requested.
707
+ # @param container_name [String] The name of the Azure storage container for
708
+ # which the SAS token is being requested.
709
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
710
+ # will be added to the HTTP request.
711
+ #
712
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
713
+ #
714
+ def list_sas_tokens_with_http_info(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
715
+ list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
716
+ end
717
+
718
+ #
719
+ # Gets the SAS token associated with the specified Data Lake Analytics and
720
+ # Azure Storage account and container combination.
721
+ #
722
+ # @param resource_group_name [String] The name of the Azure resource group that
723
+ # contains the Data Lake Analytics account.
724
+ # @param account_name [String] The name of the Data Lake Analytics account from
725
+ # which an Azure Storage account's SAS token is being requested.
726
+ # @param storage_account_name [String] The name of the Azure storage account
727
+ # for which the SAS token is being requested.
728
+ # @param container_name [String] The name of the Azure storage container for
729
+ # which the SAS token is being requested.
730
+ # @param [Hash{String => String}] A hash of custom headers that will be added
731
+ # to the HTTP request.
732
+ #
733
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
734
+ #
735
+ def list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
736
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
737
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
738
+ fail ArgumentError, 'storage_account_name is nil' if storage_account_name.nil?
739
+ fail ArgumentError, 'container_name is nil' if container_name.nil?
740
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
741
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
742
+
743
+
744
+ request_headers = {}
745
+
746
+ # Set Headers
747
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
748
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
749
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/{storageAccountName}/Containers/{containerName}/listSasTokens'
750
+
751
+ request_url = @base_url || @client.base_url
752
+
753
+ options = {
754
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
755
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'storageAccountName' => storage_account_name,'containerName' => container_name,'subscriptionId' => @client.subscription_id},
756
+ query_params: {'api-version' => @client.api_version},
757
+ headers: request_headers.merge(custom_headers || {}),
758
+ base_url: request_url
759
+ }
760
+ promise = @client.make_request_async(:post, path_template, options)
761
+
762
+ promise = promise.then do |result|
763
+ http_response = result.response
764
+ status_code = http_response.status
765
+ response_content = http_response.body
766
+ unless status_code == 200
767
+ error_model = JSON.load(response_content)
768
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
769
+ end
770
+
771
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
772
+ # Deserialize Response
773
+ if status_code == 200
774
+ begin
775
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
776
+ result_mapper = ListSasTokensResult.mapper()
777
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
778
+ rescue Exception => e
779
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
780
+ end
781
+ end
782
+
783
+ result
784
+ end
785
+
786
+ promise.execute
787
+ end
788
+
789
+ #
790
+ # Gets the first page of Azure Storage accounts, if any, linked to the
791
+ # specified Data Lake Analytics account. The response includes a link to the
792
+ # next page, if any.
793
+ #
794
+ # @param resource_group_name [String] The name of the Azure resource group that
795
+ # contains the Data Lake Analytics account.
796
+ # @param account_name [String] The name of the Data Lake Analytics account for
797
+ # which to list Azure Storage accounts.
798
+ # @param filter [String] The OData filter. Optional.
799
+ # @param top [Integer] The number of items to return. Optional.
800
+ # @param skip [Integer] The number of items to skip over before returning
801
+ # elements. Optional.
802
+ # @param select [String] OData Select statement. Limits the properties on each
803
+ # entry to just those requested, e.g.
804
+ # Categories?$select=CategoryName,Description. Optional.
805
+ # @param orderby [String] OrderBy clause. One or more comma-separated
806
+ # expressions with an optional "asc" (the default) or "desc" depending on the
807
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
808
+ # desc. Optional.
809
+ # @param count [Boolean] The Boolean value of true or false to request a count
810
+ # of the matching resources included with the resources in the response, e.g.
811
+ # Categories?$count=true. Optional.
812
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
813
+ # will be added to the HTTP request.
814
+ #
815
+ # @return [Array<StorageAccountInfo>] operation results.
816
+ #
817
+ def list_by_account(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
818
+ first_page = list_by_account_as_lazy(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers)
819
+ first_page.get_all_items
820
+ end
821
+
822
+ #
823
+ # Gets the first page of Azure Storage accounts, if any, linked to the
824
+ # specified Data Lake Analytics account. The response includes a link to the
825
+ # next page, if any.
826
+ #
827
+ # @param resource_group_name [String] The name of the Azure resource group that
828
+ # contains the Data Lake Analytics account.
829
+ # @param account_name [String] The name of the Data Lake Analytics account for
830
+ # which to list Azure Storage accounts.
831
+ # @param filter [String] The OData filter. Optional.
832
+ # @param top [Integer] The number of items to return. Optional.
833
+ # @param skip [Integer] The number of items to skip over before returning
834
+ # elements. Optional.
835
+ # @param select [String] OData Select statement. Limits the properties on each
836
+ # entry to just those requested, e.g.
837
+ # Categories?$select=CategoryName,Description. Optional.
838
+ # @param orderby [String] OrderBy clause. One or more comma-separated
839
+ # expressions with an optional "asc" (the default) or "desc" depending on the
840
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
841
+ # desc. Optional.
842
+ # @param count [Boolean] The Boolean value of true or false to request a count
843
+ # of the matching resources included with the resources in the response, e.g.
844
+ # Categories?$count=true. Optional.
845
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
846
+ # will be added to the HTTP request.
847
+ #
848
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
849
+ #
850
+ def list_by_account_with_http_info(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
851
+ list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value!
852
+ end
853
+
854
+ #
855
+ # Gets the first page of Azure Storage accounts, if any, linked to the
856
+ # specified Data Lake Analytics account. The response includes a link to the
857
+ # next page, if any.
858
+ #
859
+ # @param resource_group_name [String] The name of the Azure resource group that
860
+ # contains the Data Lake Analytics account.
861
+ # @param account_name [String] The name of the Data Lake Analytics account for
862
+ # which to list Azure Storage accounts.
863
+ # @param filter [String] The OData filter. Optional.
864
+ # @param top [Integer] The number of items to return. Optional.
865
+ # @param skip [Integer] The number of items to skip over before returning
866
+ # elements. Optional.
867
+ # @param select [String] OData Select statement. Limits the properties on each
868
+ # entry to just those requested, e.g.
869
+ # Categories?$select=CategoryName,Description. Optional.
870
+ # @param orderby [String] OrderBy clause. One or more comma-separated
871
+ # expressions with an optional "asc" (the default) or "desc" depending on the
872
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
873
+ # desc. Optional.
874
+ # @param count [Boolean] The Boolean value of true or false to request a count
875
+ # of the matching resources included with the resources in the response, e.g.
876
+ # Categories?$count=true. Optional.
877
+ # @param [Hash{String => String}] A hash of custom headers that will be added
878
+ # to the HTTP request.
879
+ #
880
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
881
+ #
882
+ def list_by_account_async(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
883
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
884
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
885
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
886
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
887
+
888
+
889
+ request_headers = {}
890
+
891
+ # Set Headers
892
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
893
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
894
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/StorageAccounts/'
895
+
896
+ request_url = @base_url || @client.base_url
897
+
898
+ options = {
899
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
900
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
901
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$select' => select,'$orderby' => orderby,'$count' => count,'api-version' => @client.api_version},
902
+ headers: request_headers.merge(custom_headers || {}),
903
+ base_url: request_url
904
+ }
905
+ promise = @client.make_request_async(:get, path_template, options)
906
+
907
+ promise = promise.then do |result|
908
+ http_response = result.response
909
+ status_code = http_response.status
910
+ response_content = http_response.body
911
+ unless status_code == 200
912
+ error_model = JSON.load(response_content)
913
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
914
+ end
915
+
916
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
917
+ # Deserialize Response
918
+ if status_code == 200
919
+ begin
920
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
921
+ result_mapper = DataLakeAnalyticsAccountListStorageAccountsResult.mapper()
922
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
923
+ rescue Exception => e
924
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
925
+ end
926
+ end
927
+
928
+ result
929
+ end
930
+
931
+ promise.execute
932
+ end
933
+
934
+ #
935
+ # Lists the Azure Storage containers, if any, associated with the specified
936
+ # Data Lake Analytics and Azure Storage account combination. The response
937
+ # includes a link to the next page of results, if any.
938
+ #
939
+ # @param next_page_link [String] The NextLink from the previous successful call
940
+ # to List operation.
941
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
942
+ # will be added to the HTTP request.
943
+ #
944
+ # @return [ListStorageContainersResult] operation results.
945
+ #
946
+ def list_storage_containers_next(next_page_link, custom_headers = nil)
947
+ response = list_storage_containers_next_async(next_page_link, custom_headers).value!
948
+ response.body unless response.nil?
949
+ end
950
+
951
+ #
952
+ # Lists the Azure Storage containers, if any, associated with the specified
953
+ # Data Lake Analytics and Azure Storage account combination. The response
954
+ # includes a link to the next page of results, if any.
955
+ #
956
+ # @param next_page_link [String] The NextLink from the previous successful call
957
+ # to List operation.
958
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
959
+ # will be added to the HTTP request.
960
+ #
961
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
962
+ #
963
+ def list_storage_containers_next_with_http_info(next_page_link, custom_headers = nil)
964
+ list_storage_containers_next_async(next_page_link, custom_headers).value!
965
+ end
966
+
967
+ #
968
+ # Lists the Azure Storage containers, if any, associated with the specified
969
+ # Data Lake Analytics and Azure Storage account combination. The response
970
+ # includes a link to the next page of results, if any.
971
+ #
972
+ # @param next_page_link [String] The NextLink from the previous successful call
973
+ # to List operation.
974
+ # @param [Hash{String => String}] A hash of custom headers that will be added
975
+ # to the HTTP request.
976
+ #
977
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
978
+ #
979
+ def list_storage_containers_next_async(next_page_link, custom_headers = nil)
980
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
981
+
982
+
983
+ request_headers = {}
984
+
985
+ # Set Headers
986
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
987
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
988
+ path_template = '{nextLink}'
989
+
990
+ request_url = @base_url || @client.base_url
991
+
992
+ options = {
993
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
994
+ skip_encoding_path_params: {'nextLink' => next_page_link},
995
+ headers: request_headers.merge(custom_headers || {}),
996
+ base_url: request_url
997
+ }
998
+ promise = @client.make_request_async(:get, path_template, options)
999
+
1000
+ promise = promise.then do |result|
1001
+ http_response = result.response
1002
+ status_code = http_response.status
1003
+ response_content = http_response.body
1004
+ unless status_code == 200
1005
+ error_model = JSON.load(response_content)
1006
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1007
+ end
1008
+
1009
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1010
+ # Deserialize Response
1011
+ if status_code == 200
1012
+ begin
1013
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1014
+ result_mapper = ListStorageContainersResult.mapper()
1015
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1016
+ rescue Exception => e
1017
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1018
+ end
1019
+ end
1020
+
1021
+ result
1022
+ end
1023
+
1024
+ promise.execute
1025
+ end
1026
+
1027
+ #
1028
+ # Gets the SAS token associated with the specified Data Lake Analytics and
1029
+ # Azure Storage account and container combination.
1030
+ #
1031
+ # @param next_page_link [String] The NextLink from the previous successful call
1032
+ # to List operation.
1033
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1034
+ # will be added to the HTTP request.
1035
+ #
1036
+ # @return [ListSasTokensResult] operation results.
1037
+ #
1038
+ def list_sas_tokens_next(next_page_link, custom_headers = nil)
1039
+ response = list_sas_tokens_next_async(next_page_link, custom_headers).value!
1040
+ response.body unless response.nil?
1041
+ end
1042
+
1043
+ #
1044
+ # Gets the SAS token associated with the specified Data Lake Analytics and
1045
+ # Azure Storage account and container combination.
1046
+ #
1047
+ # @param next_page_link [String] The NextLink from the previous successful call
1048
+ # to List operation.
1049
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1050
+ # will be added to the HTTP request.
1051
+ #
1052
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1053
+ #
1054
+ def list_sas_tokens_next_with_http_info(next_page_link, custom_headers = nil)
1055
+ list_sas_tokens_next_async(next_page_link, custom_headers).value!
1056
+ end
1057
+
1058
+ #
1059
+ # Gets the SAS token associated with the specified Data Lake Analytics and
1060
+ # Azure Storage account and container combination.
1061
+ #
1062
+ # @param next_page_link [String] The NextLink from the previous successful call
1063
+ # to List operation.
1064
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1065
+ # to the HTTP request.
1066
+ #
1067
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1068
+ #
1069
+ def list_sas_tokens_next_async(next_page_link, custom_headers = nil)
1070
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1071
+
1072
+
1073
+ request_headers = {}
1074
+
1075
+ # Set Headers
1076
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1077
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1078
+ path_template = '{nextLink}'
1079
+
1080
+ request_url = @base_url || @client.base_url
1081
+
1082
+ options = {
1083
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1084
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1085
+ headers: request_headers.merge(custom_headers || {}),
1086
+ base_url: request_url
1087
+ }
1088
+ promise = @client.make_request_async(:post, path_template, options)
1089
+
1090
+ promise = promise.then do |result|
1091
+ http_response = result.response
1092
+ status_code = http_response.status
1093
+ response_content = http_response.body
1094
+ unless status_code == 200
1095
+ error_model = JSON.load(response_content)
1096
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1097
+ end
1098
+
1099
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1100
+ # Deserialize Response
1101
+ if status_code == 200
1102
+ begin
1103
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1104
+ result_mapper = ListSasTokensResult.mapper()
1105
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1106
+ rescue Exception => e
1107
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1108
+ end
1109
+ end
1110
+
1111
+ result
1112
+ end
1113
+
1114
+ promise.execute
1115
+ end
1116
+
1117
+ #
1118
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1119
+ # specified Data Lake Analytics account. The response includes a link to the
1120
+ # next page, if any.
1121
+ #
1122
+ # @param next_page_link [String] The NextLink from the previous successful call
1123
+ # to List operation.
1124
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1125
+ # will be added to the HTTP request.
1126
+ #
1127
+ # @return [DataLakeAnalyticsAccountListStorageAccountsResult] operation
1128
+ # results.
1129
+ #
1130
+ def list_by_account_next(next_page_link, custom_headers = nil)
1131
+ response = list_by_account_next_async(next_page_link, custom_headers).value!
1132
+ response.body unless response.nil?
1133
+ end
1134
+
1135
+ #
1136
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1137
+ # specified Data Lake Analytics account. The response includes a link to the
1138
+ # next page, if any.
1139
+ #
1140
+ # @param next_page_link [String] The NextLink from the previous successful call
1141
+ # to List operation.
1142
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1143
+ # will be added to the HTTP request.
1144
+ #
1145
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1146
+ #
1147
+ def list_by_account_next_with_http_info(next_page_link, custom_headers = nil)
1148
+ list_by_account_next_async(next_page_link, custom_headers).value!
1149
+ end
1150
+
1151
+ #
1152
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1153
+ # specified Data Lake Analytics account. The response includes a link to the
1154
+ # next page, if any.
1155
+ #
1156
+ # @param next_page_link [String] The NextLink from the previous successful call
1157
+ # to List operation.
1158
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1159
+ # to the HTTP request.
1160
+ #
1161
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1162
+ #
1163
+ def list_by_account_next_async(next_page_link, custom_headers = nil)
1164
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1165
+
1166
+
1167
+ request_headers = {}
1168
+
1169
+ # Set Headers
1170
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1171
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1172
+ path_template = '{nextLink}'
1173
+
1174
+ request_url = @base_url || @client.base_url
1175
+
1176
+ options = {
1177
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1178
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1179
+ headers: request_headers.merge(custom_headers || {}),
1180
+ base_url: request_url
1181
+ }
1182
+ promise = @client.make_request_async(:get, path_template, options)
1183
+
1184
+ promise = promise.then do |result|
1185
+ http_response = result.response
1186
+ status_code = http_response.status
1187
+ response_content = http_response.body
1188
+ unless status_code == 200
1189
+ error_model = JSON.load(response_content)
1190
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1191
+ end
1192
+
1193
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1194
+ # Deserialize Response
1195
+ if status_code == 200
1196
+ begin
1197
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1198
+ result_mapper = DataLakeAnalyticsAccountListStorageAccountsResult.mapper()
1199
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1200
+ rescue Exception => e
1201
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1202
+ end
1203
+ end
1204
+
1205
+ result
1206
+ end
1207
+
1208
+ promise.execute
1209
+ end
1210
+
1211
+ #
1212
+ # Lists the Azure Storage containers, if any, associated with the specified
1213
+ # Data Lake Analytics and Azure Storage account combination. The response
1214
+ # includes a link to the next page of results, if any.
1215
+ #
1216
+ # @param resource_group_name [String] The name of the Azure resource group that
1217
+ # contains the Data Lake Analytics account.
1218
+ # @param account_name [String] The name of the Data Lake Analytics account for
1219
+ # which to list Azure Storage blob containers.
1220
+ # @param storage_account_name [String] The name of the Azure storage account
1221
+ # from which to list blob containers.
1222
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1223
+ # will be added to the HTTP request.
1224
+ #
1225
+ # @return [ListStorageContainersResult] which provide lazy access to pages of
1226
+ # the response.
1227
+ #
1228
+ def list_storage_containers_as_lazy(resource_group_name, account_name, storage_account_name, custom_headers = nil)
1229
+ response = list_storage_containers_async(resource_group_name, account_name, storage_account_name, custom_headers).value!
1230
+ unless response.nil?
1231
+ page = response.body
1232
+ page.next_method = Proc.new do |next_page_link|
1233
+ list_storage_containers_next_async(next_page_link, custom_headers)
1234
+ end
1235
+ page
1236
+ end
1237
+ end
1238
+
1239
+ #
1240
+ # Gets the SAS token associated with the specified Data Lake Analytics and
1241
+ # Azure Storage account and container combination.
1242
+ #
1243
+ # @param resource_group_name [String] The name of the Azure resource group that
1244
+ # contains the Data Lake Analytics account.
1245
+ # @param account_name [String] The name of the Data Lake Analytics account from
1246
+ # which an Azure Storage account's SAS token is being requested.
1247
+ # @param storage_account_name [String] The name of the Azure storage account
1248
+ # for which the SAS token is being requested.
1249
+ # @param container_name [String] The name of the Azure storage container for
1250
+ # which the SAS token is being requested.
1251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1252
+ # will be added to the HTTP request.
1253
+ #
1254
+ # @return [ListSasTokensResult] which provide lazy access to pages of the
1255
+ # response.
1256
+ #
1257
+ def list_sas_tokens_as_lazy(resource_group_name, account_name, storage_account_name, container_name, custom_headers = nil)
1258
+ response = list_sas_tokens_async(resource_group_name, account_name, storage_account_name, container_name, custom_headers).value!
1259
+ unless response.nil?
1260
+ page = response.body
1261
+ page.next_method = Proc.new do |next_page_link|
1262
+ list_sas_tokens_next_async(next_page_link, custom_headers)
1263
+ end
1264
+ page
1265
+ end
1266
+ end
1267
+
1268
+ #
1269
+ # Gets the first page of Azure Storage accounts, if any, linked to the
1270
+ # specified Data Lake Analytics account. The response includes a link to the
1271
+ # next page, if any.
1272
+ #
1273
+ # @param resource_group_name [String] The name of the Azure resource group that
1274
+ # contains the Data Lake Analytics account.
1275
+ # @param account_name [String] The name of the Data Lake Analytics account for
1276
+ # which to list Azure Storage accounts.
1277
+ # @param filter [String] The OData filter. Optional.
1278
+ # @param top [Integer] The number of items to return. Optional.
1279
+ # @param skip [Integer] The number of items to skip over before returning
1280
+ # elements. Optional.
1281
+ # @param select [String] OData Select statement. Limits the properties on each
1282
+ # entry to just those requested, e.g.
1283
+ # Categories?$select=CategoryName,Description. Optional.
1284
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1285
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1286
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1287
+ # desc. Optional.
1288
+ # @param count [Boolean] The Boolean value of true or false to request a count
1289
+ # of the matching resources included with the resources in the response, e.g.
1290
+ # Categories?$count=true. Optional.
1291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1292
+ # will be added to the HTTP request.
1293
+ #
1294
+ # @return [DataLakeAnalyticsAccountListStorageAccountsResult] which provide
1295
+ # lazy access to pages of the response.
1296
+ #
1297
+ def list_by_account_as_lazy(resource_group_name, account_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
1298
+ response = list_by_account_async(resource_group_name, account_name, filter, top, skip, select, orderby, count, custom_headers).value!
1299
+ unless response.nil?
1300
+ page = response.body
1301
+ page.next_method = Proc.new do |next_page_link|
1302
+ list_by_account_next_async(next_page_link, custom_headers)
1303
+ end
1304
+ page
1305
+ end
1306
+ end
1307
+
1308
+ end
1309
+ end