azure_mgmt_datalake_store 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_datalake_store.rb +13 -11
  3. data/lib/generated/azure_mgmt_datalake_store/account.rb +485 -1083
  4. data/lib/generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb +23 -2
  5. data/lib/generated/azure_mgmt_datalake_store/firewall_rules.rb +558 -0
  6. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb +181 -33
  7. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb +1 -13
  8. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb +3 -3
  9. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb +1 -1
  10. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb +91 -0
  11. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb +1 -13
  12. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb +96 -0
  13. data/lib/generated/azure_mgmt_datalake_store/models/encryption_config.rb +3 -3
  14. data/lib/generated/azure_mgmt_datalake_store/models/encryption_config_type.rb +1 -1
  15. data/lib/generated/azure_mgmt_datalake_store/models/encryption_identity.rb +8 -8
  16. data/lib/generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb +1 -1
  17. data/lib/generated/azure_mgmt_datalake_store/models/encryption_state.rb +1 -1
  18. data/lib/generated/azure_mgmt_datalake_store/models/error.rb +1 -1
  19. data/lib/generated/azure_mgmt_datalake_store/models/error_details.rb +1 -1
  20. data/lib/generated/azure_mgmt_datalake_store/models/firewall_rule.rb +20 -29
  21. data/lib/generated/azure_mgmt_datalake_store/models/firewall_state.rb +16 -0
  22. data/lib/generated/azure_mgmt_datalake_store/models/inner_error.rb +1 -1
  23. data/lib/generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb +7 -7
  24. data/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb +67 -0
  25. data/lib/generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb +16 -0
  26. data/lib/generated/azure_mgmt_datalake_store/module_definition.rb +1 -1
  27. data/lib/generated/azure_mgmt_datalake_store/trusted_id_providers.rb +567 -0
  28. data/lib/generated/azure_mgmt_datalake_store/version.rb +2 -2
  29. metadata +11 -9
  30. data/lib/generated/azure_mgmt_datalake_store/models/azure_async_operation_result.rb +0 -66
  31. data/lib/generated/azure_mgmt_datalake_store/models/data_lake_store_account_properties.rb +0 -144
  32. data/lib/generated/azure_mgmt_datalake_store/models/encryption_identity_type.rb +0 -15
  33. data/lib/generated/azure_mgmt_datalake_store/models/firewall_rule_properties.rb +0 -54
  34. data/lib/generated/azure_mgmt_datalake_store/models/operation_status.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 492d11ea5f2df2b33352ec99200dd1a0fbb22acf
4
- data.tar.gz: 48260506d1c6cd6373306028c411b52a6d5f7bd4
3
+ metadata.gz: 1863c6bd3ff0e7105f69de95881fbe7afead421f
4
+ data.tar.gz: 6207086479d0eb8bc83768b2407cd496c0dbdd5a
5
5
  SHA512:
6
- metadata.gz: 4ce1d52bf4d8d26352e55ff21307566041759915717a55d99e5cee8c92880a426198228ddb4b125125637086f39f8031478ca63f5c6dcf7c144c89f403ac52f3
7
- data.tar.gz: 36547811f0f1551779dc0a1f7f2bc2dbd16d6b6f975e6fd0bdbeaaae7ad88a58d77c76c7143b746bdb6743fea03047506272954595fb196c81dc029a73b06c62
6
+ metadata.gz: a2109e68f2b7233c42c05f1021997938d1add9c28a5c2a7a2d9779bb3c82a107d346a357882bed9050b469d136f8d3559f66eae5f9b985b18769397d510ef0c6
7
+ data.tar.gz: 89ccdfac1a6c054e15af7d2e5c5b084764936b0945e7b01f92a22762b5080f4f27f014f4eb341d7c9f1987541f8655a18e4edb94ceffcbea05744ccff2ff274a
@@ -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
 
@@ -20,29 +20,31 @@ require 'generated/azure_mgmt_datalake_store/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::ARM::DataLakeStore
23
+ autoload :FirewallRules, 'generated/azure_mgmt_datalake_store/firewall_rules.rb'
24
+ autoload :TrustedIdProviders, 'generated/azure_mgmt_datalake_store/trusted_id_providers.rb'
23
25
  autoload :Account, 'generated/azure_mgmt_datalake_store/account.rb'
24
26
  autoload :DataLakeStoreAccountManagementClient, 'generated/azure_mgmt_datalake_store/data_lake_store_account_management_client.rb'
25
27
 
26
28
  module Models
27
- autoload :FirewallRuleProperties, 'generated/azure_mgmt_datalake_store/models/firewall_rule_properties.rb'
28
- autoload :FirewallRule, 'generated/azure_mgmt_datalake_store/models/firewall_rule.rb'
29
- autoload :DataLakeStoreFirewallRuleListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb'
30
- autoload :EncryptionIdentity, 'generated/azure_mgmt_datalake_store/models/encryption_identity.rb'
31
- autoload :EncryptionConfig, 'generated/azure_mgmt_datalake_store/models/encryption_config.rb'
29
+ autoload :DataLakeStoreAccountUpdateParameters, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_update_parameters.rb'
32
30
  autoload :KeyVaultMetaInfo, 'generated/azure_mgmt_datalake_store/models/key_vault_meta_info.rb'
33
- autoload :DataLakeStoreAccountProperties, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_properties.rb'
34
- autoload :DataLakeStoreAccount, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb'
31
+ autoload :DataLakeStoreTrustedIdProviderListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_trusted_id_provider_list_result.rb'
32
+ autoload :EncryptionIdentity, 'generated/azure_mgmt_datalake_store/models/encryption_identity.rb'
35
33
  autoload :DataLakeStoreAccountListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_list_result.rb'
36
34
  autoload :ErrorDetails, 'generated/azure_mgmt_datalake_store/models/error_details.rb'
35
+ autoload :EncryptionConfig, 'generated/azure_mgmt_datalake_store/models/encryption_config.rb'
37
36
  autoload :InnerError, 'generated/azure_mgmt_datalake_store/models/inner_error.rb'
37
+ autoload :DataLakeStoreFirewallRuleListResult, 'generated/azure_mgmt_datalake_store/models/data_lake_store_firewall_rule_list_result.rb'
38
38
  autoload :Error, 'generated/azure_mgmt_datalake_store/models/error.rb'
39
- autoload :AzureAsyncOperationResult, 'generated/azure_mgmt_datalake_store/models/azure_async_operation_result.rb'
40
- autoload :EncryptionIdentityType, 'generated/azure_mgmt_datalake_store/models/encryption_identity_type.rb'
39
+ autoload :FirewallRule, 'generated/azure_mgmt_datalake_store/models/firewall_rule.rb'
40
+ autoload :TrustedIdProvider, 'generated/azure_mgmt_datalake_store/models/trusted_id_provider.rb'
41
+ autoload :DataLakeStoreAccount, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account.rb'
41
42
  autoload :EncryptionConfigType, 'generated/azure_mgmt_datalake_store/models/encryption_config_type.rb'
42
43
  autoload :DataLakeStoreAccountStatus, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_status.rb'
43
44
  autoload :DataLakeStoreAccountState, 'generated/azure_mgmt_datalake_store/models/data_lake_store_account_state.rb'
44
45
  autoload :EncryptionState, 'generated/azure_mgmt_datalake_store/models/encryption_state.rb'
45
46
  autoload :EncryptionProvisioningState, 'generated/azure_mgmt_datalake_store/models/encryption_provisioning_state.rb'
46
- autoload :OperationStatus, 'generated/azure_mgmt_datalake_store/models/operation_status.rb'
47
+ autoload :FirewallState, 'generated/azure_mgmt_datalake_store/models/firewall_state.rb'
48
+ autoload :TrustedIdProviderState, 'generated/azure_mgmt_datalake_store/models/trusted_id_provider_state.rb'
47
49
  end
48
50
  end
@@ -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
 
@@ -23,632 +23,28 @@ module Azure::ARM::DataLakeStore
23
23
  attr_reader :client
24
24
 
25
25
  #
26
- # Deletes the specified firewall rule from the specified Data Lake Store
27
- # account
28
- #
29
- # @param resource_group_name [String] The name of the Azure resource group
30
- # that contains the Data Lake Store account.
31
- # @param account_name [String] The name of the Data Lake Store account from
32
- # which to delete the firewall rule.
33
- # @param firewall_rule_name [String] The name of the firewall rule to delete.
34
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
- # will be added to the HTTP request.
36
- #
37
- #
38
- def delete_firewall_rule(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
39
- response = delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
40
- nil
41
- end
42
-
43
- #
44
- # Deletes the specified firewall rule from the specified Data Lake Store
45
- # account
46
- #
47
- # @param resource_group_name [String] The name of the Azure resource group
48
- # that contains the Data Lake Store account.
49
- # @param account_name [String] The name of the Data Lake Store account from
50
- # which to delete the firewall rule.
51
- # @param firewall_rule_name [String] The name of the firewall rule to delete.
52
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
- # will be added to the HTTP request.
54
- #
55
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
- #
57
- def delete_firewall_rule_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
58
- delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
59
- end
60
-
61
- #
62
- # Deletes the specified firewall rule from the specified Data Lake Store
63
- # account
64
- #
65
- # @param resource_group_name [String] The name of the Azure resource group
66
- # that contains the Data Lake Store account.
67
- # @param account_name [String] The name of the Data Lake Store account from
68
- # which to delete the firewall rule.
69
- # @param firewall_rule_name [String] The name of the firewall rule to delete.
70
- # @param [Hash{String => String}] A hash of custom headers that will be added
71
- # to the HTTP request.
72
- #
73
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
- #
75
- def delete_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
76
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
- fail ArgumentError, 'account_name is nil' if account_name.nil?
78
- fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
79
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
80
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
81
-
82
-
83
- request_headers = {}
84
-
85
- # Set Headers
86
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
87
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
88
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
89
-
90
- request_url = @base_url || @client.base_url
91
-
92
- options = {
93
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
94
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
95
- query_params: {'api-version' => @client.api_version},
96
- headers: request_headers.merge(custom_headers || {}),
97
- base_url: request_url
98
- }
99
- promise = @client.make_request_async(:delete, path_template, options)
100
-
101
- promise = promise.then do |result|
102
- http_response = result.response
103
- status_code = http_response.status
104
- response_content = http_response.body
105
- unless status_code == 200 || status_code == 204
106
- error_model = JSON.load(response_content)
107
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
108
- end
109
-
110
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
-
112
- result
113
- end
114
-
115
- promise.execute
116
- end
117
-
118
- #
119
- # Gets the specified Data Lake Store firewall rule.
120
- #
121
- # @param resource_group_name [String] The name of the Azure resource group
122
- # that contains the Data Lake Store account.
123
- # @param account_name [String] The name of the Data Lake Store account from
124
- # which to get the firewall rule.
125
- # @param firewall_rule_name [String] The name of the firewall rule to retrieve.
126
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
- # will be added to the HTTP request.
128
- #
129
- # @return [FirewallRule] operation results.
130
- #
131
- def get_firewall_rule(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
132
- response = get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
133
- response.body unless response.nil?
134
- end
135
-
136
- #
137
- # Gets the specified Data Lake Store firewall rule.
138
- #
139
- # @param resource_group_name [String] The name of the Azure resource group
140
- # that contains the Data Lake Store account.
141
- # @param account_name [String] The name of the Data Lake Store account from
142
- # which to get the firewall rule.
143
- # @param firewall_rule_name [String] The name of the firewall rule to retrieve.
144
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
- # will be added to the HTTP request.
146
- #
147
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
148
- #
149
- def get_firewall_rule_with_http_info(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
150
- get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers).value!
151
- end
152
-
153
- #
154
- # Gets the specified Data Lake Store firewall rule.
155
- #
156
- # @param resource_group_name [String] The name of the Azure resource group
157
- # that contains the Data Lake Store account.
158
- # @param account_name [String] The name of the Data Lake Store account from
159
- # which to get the firewall rule.
160
- # @param firewall_rule_name [String] The name of the firewall rule to retrieve.
161
- # @param [Hash{String => String}] A hash of custom headers that will be added
162
- # to the HTTP request.
163
- #
164
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
165
- #
166
- def get_firewall_rule_async(resource_group_name, account_name, firewall_rule_name, custom_headers = nil)
167
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
168
- fail ArgumentError, 'account_name is nil' if account_name.nil?
169
- fail ArgumentError, 'firewall_rule_name is nil' if firewall_rule_name.nil?
170
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
171
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
172
-
173
-
174
- request_headers = {}
175
-
176
- # Set Headers
177
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
178
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
179
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules/{firewallRuleName}'
180
-
181
- request_url = @base_url || @client.base_url
182
-
183
- options = {
184
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
185
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'firewallRuleName' => firewall_rule_name,'subscriptionId' => @client.subscription_id},
186
- query_params: {'api-version' => @client.api_version},
187
- headers: request_headers.merge(custom_headers || {}),
188
- base_url: request_url
189
- }
190
- promise = @client.make_request_async(:get, path_template, options)
191
-
192
- promise = promise.then do |result|
193
- http_response = result.response
194
- status_code = http_response.status
195
- response_content = http_response.body
196
- unless status_code == 200
197
- error_model = JSON.load(response_content)
198
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
199
- end
200
-
201
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
202
- # Deserialize Response
203
- if status_code == 200
204
- begin
205
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
206
- result_mapper = FirewallRule.mapper()
207
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
208
- rescue Exception => e
209
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
210
- end
211
- end
212
-
213
- result
214
- end
215
-
216
- promise.execute
217
- end
218
-
219
- #
220
- # Lists the Data Lake Store firewall rules within the specified Data Lake
221
- # Store account.
222
- #
223
- # @param resource_group_name [String] The name of the Azure resource group
224
- # that contains the Data Lake Store account.
225
- # @param account_name [String] The name of the Data Lake Store account from
226
- # which to get the firewall rules.
227
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
- # will be added to the HTTP request.
229
- #
230
- # @return [DataLakeStoreFirewallRuleListResult] which provide lazy access to
231
- # pages of the response.
232
- #
233
- def list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers = nil)
234
- response = list_firewall_rules_async(resource_group_name, account_name, custom_headers).value!
235
- unless response.nil?
236
- page = response.body
237
- page.next_method = Proc.new do |next_page_link|
238
- list_firewall_rules_next_async(next_page_link, custom_headers)
239
- end
240
- page
241
- end
242
- end
243
-
244
- #
245
- # Lists the Data Lake Store firewall rules within the specified Data Lake
246
- # Store account.
247
- #
248
- # @param resource_group_name [String] The name of the Azure resource group
249
- # that contains the Data Lake Store account.
250
- # @param account_name [String] The name of the Data Lake Store account from
251
- # which to get the firewall rules.
252
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
253
- # will be added to the HTTP request.
254
- #
255
- # @return [Array<FirewallRule>] operation results.
256
- #
257
- def list_firewall_rules(resource_group_name, account_name, custom_headers = nil)
258
- first_page = list_firewall_rules_as_lazy(resource_group_name, account_name, custom_headers)
259
- first_page.get_all_items
260
- end
261
-
262
- #
263
- # Lists the Data Lake Store firewall rules within the specified Data Lake
264
- # Store account.
265
- #
266
- # @param resource_group_name [String] The name of the Azure resource group
267
- # that contains the Data Lake Store account.
268
- # @param account_name [String] The name of the Data Lake Store account from
269
- # which to get the firewall rules.
270
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
271
- # will be added to the HTTP request.
272
- #
273
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
274
- #
275
- def list_firewall_rules_with_http_info(resource_group_name, account_name, custom_headers = nil)
276
- list_firewall_rules_async(resource_group_name, account_name, custom_headers).value!
277
- end
278
-
279
- #
280
- # Lists the Data Lake Store firewall rules within the specified Data Lake
281
- # Store account.
282
- #
283
- # @param resource_group_name [String] The name of the Azure resource group
284
- # that contains the Data Lake Store account.
285
- # @param account_name [String] The name of the Data Lake Store account from
286
- # which to get the firewall rules.
287
- # @param [Hash{String => String}] A hash of custom headers that will be added
288
- # to the HTTP request.
289
- #
290
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
291
- #
292
- def list_firewall_rules_async(resource_group_name, account_name, custom_headers = nil)
293
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
294
- fail ArgumentError, 'account_name is nil' if account_name.nil?
295
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
296
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
297
-
298
-
299
- request_headers = {}
300
-
301
- # Set Headers
302
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
303
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
304
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/firewallRules'
305
-
306
- request_url = @base_url || @client.base_url
307
-
308
- options = {
309
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
310
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
311
- query_params: {'api-version' => @client.api_version},
312
- headers: request_headers.merge(custom_headers || {}),
313
- base_url: request_url
314
- }
315
- promise = @client.make_request_async(:get, path_template, options)
316
-
317
- promise = promise.then do |result|
318
- http_response = result.response
319
- status_code = http_response.status
320
- response_content = http_response.body
321
- unless status_code == 200
322
- error_model = JSON.load(response_content)
323
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
324
- end
325
-
326
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
327
- # Deserialize Response
328
- if status_code == 200
329
- begin
330
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
331
- result_mapper = DataLakeStoreFirewallRuleListResult.mapper()
332
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
333
- rescue Exception => e
334
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
335
- end
336
- end
337
-
338
- result
339
- end
340
-
341
- promise.execute
342
- end
343
-
344
- #
345
- # Creates or updates the specified firewall rule.
346
- #
347
- # @param resource_group_name [String] The name of the Azure resource group
348
- # that contains the Data Lake Store account.
349
- # @param account_name [String] The name of the Data Lake Store account to
350
- # which to add the firewall rule.
351
- # @param name [String] The name of the firewall rule to create or update.
352
- # @param parameters [FirewallRule] Parameters supplied to create the create
353
- # firewall rule.
354
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
355
- # will be added to the HTTP request.
356
- #
357
- # @return [FirewallRule] operation results.
358
- #
359
- def create_or_update_firewall_rule(resource_group_name, account_name, name, parameters, custom_headers = nil)
360
- response = create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers).value!
361
- response.body unless response.nil?
362
- end
363
-
364
- #
365
- # Creates or updates the specified firewall rule.
366
- #
367
- # @param resource_group_name [String] The name of the Azure resource group
368
- # that contains the Data Lake Store account.
369
- # @param account_name [String] The name of the Data Lake Store account to
370
- # which to add the firewall rule.
371
- # @param name [String] The name of the firewall rule to create or update.
372
- # @param parameters [FirewallRule] Parameters supplied to create the create
373
- # firewall rule.
374
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
375
- # will be added to the HTTP request.
376
- #
377
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
378
- #
379
- def create_or_update_firewall_rule_with_http_info(resource_group_name, account_name, name, parameters, custom_headers = nil)
380
- create_or_update_firewall_rule_async(resource_group_name, account_name, name, parameters, custom_headers).value!
381
- end
382
-
383
- #
384
- # Creates or updates the specified firewall rule.
385
- #
386
- # @param resource_group_name [String] The name of the Azure resource group
387
- # that contains the Data Lake Store account.
388
- # @param account_name [String] The name of the Data Lake Store account to
389
- # which to add the firewall rule.
390
- # @param name [String] The name of the firewall rule to create or update.
391
- # @param parameters [FirewallRule] Parameters supplied to create the create
392
- # firewall rule.
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 create_or_update_firewall_rule_async(resource_group_name, account_name, 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, 'name is nil' if 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 = FirewallRule.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.DataLakeStore/accounts/{accountName}/firewallRules/{name}'
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,'name' => 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
- # Deserialize Response
445
- if status_code == 200
446
- begin
447
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
448
- result_mapper = FirewallRule.mapper()
449
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
450
- rescue Exception => e
451
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
452
- end
453
- end
454
-
455
- result
456
- end
457
-
458
- promise.execute
459
- end
460
-
461
- #
462
- # Creates the specified Data Lake Store account.
463
- #
464
- # @param resource_group_name [String] The name of the Azure resource group
465
- # that contains the Data Lake Store account.
466
- # @param name [String] The name of the Data Lake Store account to create.
467
- # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
468
- # Data Lake Store account.
469
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
470
- # will be added to the HTTP request.
471
- #
472
- # @return [DataLakeStoreAccount] operation results.
473
- #
474
- def create(resource_group_name, name, parameters, custom_headers = nil)
475
- response = create_async(resource_group_name, name, parameters, custom_headers).value!
476
- response.body unless response.nil?
477
- end
478
-
479
- #
480
- # @param resource_group_name [String] The name of the Azure resource group
481
- # that contains the Data Lake Store account.
482
- # @param name [String] The name of the Data Lake Store account to create.
483
- # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
484
- # Data Lake Store account.
485
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
486
- # will be added to the HTTP request.
487
- #
488
- # @return [Concurrent::Promise] promise which provides async access to http
489
- # response.
490
- #
491
- def create_async(resource_group_name, name, parameters, custom_headers = nil)
492
- # Send request
493
- promise = begin_create_async(resource_group_name, name, parameters, custom_headers)
494
-
495
- promise = promise.then do |response|
496
- # Defining deserialization method.
497
- deserialize_method = lambda do |parsed_response|
498
- result_mapper = DataLakeStoreAccount.mapper()
499
- parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
500
- end
501
-
502
- # Waiting for response.
503
- @client.get_long_running_operation_result(response, deserialize_method)
504
- end
505
-
506
- promise
507
- end
508
-
509
- #
510
- # Creates the specified Data Lake Store account.
511
- #
512
- # @param resource_group_name [String] The name of the Azure resource group
513
- # that contains the Data Lake Store account.
514
- # @param name [String] The name of the Data Lake Store account to create.
515
- # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
516
- # Data Lake Store account.
517
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
518
- # will be added to the HTTP request.
519
- #
520
- # @return [DataLakeStoreAccount] operation results.
521
- #
522
- def begin_create(resource_group_name, name, parameters, custom_headers = nil)
523
- response = begin_create_async(resource_group_name, name, parameters, custom_headers).value!
524
- response.body unless response.nil?
525
- end
526
-
527
- #
528
- # Creates the specified Data Lake Store account.
529
- #
530
- # @param resource_group_name [String] The name of the Azure resource group
531
- # that contains the Data Lake Store account.
532
- # @param name [String] The name of the Data Lake Store account to create.
533
- # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
534
- # Data Lake Store account.
535
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
536
- # will be added to the HTTP request.
537
- #
538
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
539
- #
540
- def begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
541
- begin_create_async(resource_group_name, name, parameters, custom_headers).value!
542
- end
543
-
544
- #
545
- # Creates the specified Data Lake Store account.
546
- #
547
- # @param resource_group_name [String] The name of the Azure resource group
548
- # that contains the Data Lake Store account.
549
- # @param name [String] The name of the Data Lake Store account to create.
550
- # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
551
- # Data Lake Store account.
552
- # @param [Hash{String => String}] A hash of custom headers that will be added
553
- # to the HTTP request.
554
- #
555
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
556
- #
557
- def begin_create_async(resource_group_name, name, parameters, custom_headers = nil)
558
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
559
- fail ArgumentError, 'name is nil' if name.nil?
560
- fail ArgumentError, 'parameters is nil' if parameters.nil?
561
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
562
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
563
-
564
-
565
- request_headers = {}
566
-
567
- # Set Headers
568
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
569
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
570
-
571
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
572
-
573
- # Serialize Request
574
- request_mapper = DataLakeStoreAccount.mapper()
575
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
576
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
577
-
578
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'
579
-
580
- request_url = @base_url || @client.base_url
581
-
582
- options = {
583
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
584
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
585
- query_params: {'api-version' => @client.api_version},
586
- body: request_content,
587
- headers: request_headers.merge(custom_headers || {}),
588
- base_url: request_url
589
- }
590
- promise = @client.make_request_async(:put, path_template, options)
591
-
592
- promise = promise.then do |result|
593
- http_response = result.response
594
- status_code = http_response.status
595
- response_content = http_response.body
596
- unless status_code == 201 || status_code == 200
597
- error_model = JSON.load(response_content)
598
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
599
- end
600
-
601
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
602
- # Deserialize Response
603
- if status_code == 201
604
- begin
605
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
606
- result_mapper = DataLakeStoreAccount.mapper()
607
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
608
- rescue Exception => e
609
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
610
- end
611
- end
612
- # Deserialize Response
613
- if status_code == 200
614
- begin
615
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
616
- result_mapper = DataLakeStoreAccount.mapper()
617
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
618
- rescue Exception => e
619
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
620
- end
621
- end
622
-
623
- result
624
- end
625
-
626
- promise.execute
627
- end
628
-
629
- #
630
- # Updates the specified Data Lake Store account information.
26
+ # Creates the specified Data Lake Store account.
631
27
  #
632
- # @param resource_group_name [String] The name of the Azure resource group
633
- # that contains the Data Lake Store account.
634
- # @param name [String] The name of the Data Lake Store account to update.
635
- # @param parameters [DataLakeStoreAccount] Parameters supplied to update the
28
+ # @param resource_group_name [String] The name of the Azure resource group that
29
+ # contains the Data Lake Store account.
30
+ # @param name [String] The name of the Data Lake Store account to create.
31
+ # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
636
32
  # Data Lake Store account.
637
33
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
638
34
  # will be added to the HTTP request.
639
35
  #
640
36
  # @return [DataLakeStoreAccount] operation results.
641
37
  #
642
- def update(resource_group_name, name, parameters, custom_headers = nil)
643
- response = update_async(resource_group_name, name, parameters, custom_headers).value!
38
+ def create(resource_group_name, name, parameters, custom_headers = nil)
39
+ response = create_async(resource_group_name, name, parameters, custom_headers).value!
644
40
  response.body unless response.nil?
645
41
  end
646
42
 
647
43
  #
648
- # @param resource_group_name [String] The name of the Azure resource group
649
- # that contains the Data Lake Store account.
650
- # @param name [String] The name of the Data Lake Store account to update.
651
- # @param parameters [DataLakeStoreAccount] Parameters supplied to update the
44
+ # @param resource_group_name [String] The name of the Azure resource group that
45
+ # contains the Data Lake Store account.
46
+ # @param name [String] The name of the Data Lake Store account to create.
47
+ # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
652
48
  # Data Lake Store account.
653
49
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
654
50
  # will be added to the HTTP request.
@@ -656,9 +52,9 @@ module Azure::ARM::DataLakeStore
656
52
  # @return [Concurrent::Promise] promise which provides async access to http
657
53
  # response.
658
54
  #
659
- def update_async(resource_group_name, name, parameters, custom_headers = nil)
55
+ def create_async(resource_group_name, name, parameters, custom_headers = nil)
660
56
  # Send request
661
- promise = begin_update_async(resource_group_name, name, parameters, custom_headers)
57
+ promise = begin_create_async(resource_group_name, name, parameters, custom_headers)
662
58
 
663
59
  promise = promise.then do |response|
664
60
  # Defining deserialization method.
@@ -677,156 +73,42 @@ module Azure::ARM::DataLakeStore
677
73
  #
678
74
  # Updates the specified Data Lake Store account information.
679
75
  #
680
- # @param resource_group_name [String] The name of the Azure resource group
681
- # that contains the Data Lake Store account.
76
+ # @param resource_group_name [String] The name of the Azure resource group that
77
+ # contains the Data Lake Store account.
682
78
  # @param name [String] The name of the Data Lake Store account to update.
683
- # @param parameters [DataLakeStoreAccount] Parameters supplied to update the
684
- # Data Lake Store account.
79
+ # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied
80
+ # to update the Data Lake Store account.
685
81
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
686
82
  # will be added to the HTTP request.
687
83
  #
688
84
  # @return [DataLakeStoreAccount] operation results.
689
85
  #
690
- def begin_update(resource_group_name, name, parameters, custom_headers = nil)
691
- response = begin_update_async(resource_group_name, name, parameters, custom_headers).value!
86
+ def update(resource_group_name, name, parameters, custom_headers = nil)
87
+ response = update_async(resource_group_name, name, parameters, custom_headers).value!
692
88
  response.body unless response.nil?
693
89
  end
694
90
 
695
91
  #
696
- # Updates the specified Data Lake Store account information.
697
- #
698
- # @param resource_group_name [String] The name of the Azure resource group
699
- # that contains the Data Lake Store account.
700
- # @param name [String] The name of the Data Lake Store account to update.
701
- # @param parameters [DataLakeStoreAccount] Parameters supplied to update the
702
- # Data Lake Store account.
703
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
704
- # will be added to the HTTP request.
705
- #
706
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
707
- #
708
- def begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
709
- begin_update_async(resource_group_name, name, parameters, custom_headers).value!
710
- end
711
-
712
- #
713
- # Updates the specified Data Lake Store account information.
714
- #
715
- # @param resource_group_name [String] The name of the Azure resource group
716
- # that contains the Data Lake Store account.
92
+ # @param resource_group_name [String] The name of the Azure resource group that
93
+ # contains the Data Lake Store account.
717
94
  # @param name [String] The name of the Data Lake Store account to update.
718
- # @param parameters [DataLakeStoreAccount] Parameters supplied to update the
719
- # Data Lake Store account.
720
- # @param [Hash{String => String}] A hash of custom headers that will be added
721
- # to the HTTP request.
722
- #
723
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
724
- #
725
- def begin_update_async(resource_group_name, name, parameters, custom_headers = nil)
726
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
727
- fail ArgumentError, 'name is nil' if name.nil?
728
- fail ArgumentError, 'parameters is nil' if parameters.nil?
729
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
730
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
731
-
732
-
733
- request_headers = {}
734
-
735
- # Set Headers
736
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
737
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
738
-
739
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
740
-
741
- # Serialize Request
742
- request_mapper = DataLakeStoreAccount.mapper()
743
- request_content = @client.serialize(request_mapper, parameters, 'parameters')
744
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
745
-
746
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'
747
-
748
- request_url = @base_url || @client.base_url
749
-
750
- options = {
751
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
752
- path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
753
- query_params: {'api-version' => @client.api_version},
754
- body: request_content,
755
- headers: request_headers.merge(custom_headers || {}),
756
- base_url: request_url
757
- }
758
- promise = @client.make_request_async(:patch, path_template, options)
759
-
760
- promise = promise.then do |result|
761
- http_response = result.response
762
- status_code = http_response.status
763
- response_content = http_response.body
764
- unless status_code == 200 || status_code == 201
765
- error_model = JSON.load(response_content)
766
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
767
- end
768
-
769
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
770
- # Deserialize Response
771
- if status_code == 200
772
- begin
773
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
774
- result_mapper = DataLakeStoreAccount.mapper()
775
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
776
- rescue Exception => e
777
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
778
- end
779
- end
780
- # Deserialize Response
781
- if status_code == 201
782
- begin
783
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
784
- result_mapper = DataLakeStoreAccount.mapper()
785
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
786
- rescue Exception => e
787
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
788
- end
789
- end
790
-
791
- result
792
- end
793
-
794
- promise.execute
795
- end
796
-
797
- #
798
- # Deletes the specified Data Lake Store account.
799
- #
800
- # @param resource_group_name [String] The name of the Azure resource group
801
- # that contains the Data Lake Store account.
802
- # @param account_name [String] The name of the Data Lake Store account to
803
- # delete.
804
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
805
- # will be added to the HTTP request.
806
- #
807
- def delete(resource_group_name, account_name, custom_headers = nil)
808
- response = delete_async(resource_group_name, account_name, custom_headers).value!
809
- nil
810
- end
811
-
812
- #
813
- # @param resource_group_name [String] The name of the Azure resource group
814
- # that contains the Data Lake Store account.
815
- # @param account_name [String] The name of the Data Lake Store account to
816
- # delete.
95
+ # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied
96
+ # to update the Data Lake Store account.
817
97
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
818
98
  # will be added to the HTTP request.
819
99
  #
820
100
  # @return [Concurrent::Promise] promise which provides async access to http
821
101
  # response.
822
102
  #
823
- def delete_async(resource_group_name, account_name, custom_headers = nil)
103
+ def update_async(resource_group_name, name, parameters, custom_headers = nil)
824
104
  # Send request
825
- promise = begin_delete_async(resource_group_name, account_name, custom_headers)
105
+ promise = begin_update_async(resource_group_name, name, parameters, custom_headers)
826
106
 
827
107
  promise = promise.then do |response|
828
108
  # Defining deserialization method.
829
109
  deserialize_method = lambda do |parsed_response|
110
+ result_mapper = DataLakeStoreAccount.mapper()
111
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
830
112
  end
831
113
 
832
114
  # Waiting for response.
@@ -839,94 +121,50 @@ module Azure::ARM::DataLakeStore
839
121
  #
840
122
  # Deletes the specified Data Lake Store account.
841
123
  #
842
- # @param resource_group_name [String] The name of the Azure resource group
843
- # that contains the Data Lake Store account.
124
+ # @param resource_group_name [String] The name of the Azure resource group that
125
+ # contains the Data Lake Store account.
844
126
  # @param account_name [String] The name of the Data Lake Store account to
845
127
  # delete.
846
128
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
847
129
  # will be added to the HTTP request.
848
130
  #
849
- #
850
- def begin_delete(resource_group_name, account_name, custom_headers = nil)
851
- response = begin_delete_async(resource_group_name, account_name, custom_headers).value!
131
+ def delete(resource_group_name, account_name, custom_headers = nil)
132
+ response = delete_async(resource_group_name, account_name, custom_headers).value!
852
133
  nil
853
- end
854
-
855
- #
856
- # Deletes the specified Data Lake Store account.
857
- #
858
- # @param resource_group_name [String] The name of the Azure resource group
859
- # that contains the Data Lake Store account.
860
- # @param account_name [String] The name of the Data Lake Store account to
861
- # delete.
862
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
863
- # will be added to the HTTP request.
864
- #
865
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
866
- #
867
- def begin_delete_with_http_info(resource_group_name, account_name, custom_headers = nil)
868
- begin_delete_async(resource_group_name, account_name, custom_headers).value!
869
- end
870
-
871
- #
872
- # Deletes the specified Data Lake Store account.
873
- #
874
- # @param resource_group_name [String] The name of the Azure resource group
875
- # that contains the Data Lake Store account.
876
- # @param account_name [String] The name of the Data Lake Store account to
877
- # delete.
878
- # @param [Hash{String => String}] A hash of custom headers that will be added
879
- # to the HTTP request.
880
- #
881
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
882
- #
883
- def begin_delete_async(resource_group_name, account_name, custom_headers = nil)
884
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
885
- fail ArgumentError, 'account_name is nil' if account_name.nil?
886
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
887
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
888
-
889
-
890
- request_headers = {}
891
-
892
- # Set Headers
893
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
894
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
895
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'
896
-
897
- request_url = @base_url || @client.base_url
134
+ end
898
135
 
899
- options = {
900
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
901
- path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
902
- query_params: {'api-version' => @client.api_version},
903
- headers: request_headers.merge(custom_headers || {}),
904
- base_url: request_url
905
- }
906
- promise = @client.make_request_async(:delete, path_template, options)
136
+ #
137
+ # @param resource_group_name [String] The name of the Azure resource group that
138
+ # contains the Data Lake Store account.
139
+ # @param account_name [String] The name of the Data Lake Store account to
140
+ # delete.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [Concurrent::Promise] promise which provides async access to http
145
+ # response.
146
+ #
147
+ def delete_async(resource_group_name, account_name, custom_headers = nil)
148
+ # Send request
149
+ promise = begin_delete_async(resource_group_name, account_name, custom_headers)
907
150
 
908
- promise = promise.then do |result|
909
- http_response = result.response
910
- status_code = http_response.status
911
- response_content = http_response.body
912
- unless status_code == 200 || status_code == 404 || status_code == 204 || status_code == 202
913
- error_model = JSON.load(response_content)
914
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
151
+ promise = promise.then do |response|
152
+ # Defining deserialization method.
153
+ deserialize_method = lambda do |parsed_response|
915
154
  end
916
155
 
917
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
918
-
919
- result
156
+ # Waiting for response.
157
+ @client.get_long_running_operation_result(response, deserialize_method)
920
158
  end
921
159
 
922
- promise.execute
160
+ promise
923
161
  end
924
162
 
925
163
  #
926
164
  # Gets the specified Data Lake Store account.
927
165
  #
928
- # @param resource_group_name [String] The name of the Azure resource group
929
- # that contains the Data Lake Store account.
166
+ # @param resource_group_name [String] The name of the Azure resource group that
167
+ # contains the Data Lake Store account.
930
168
  # @param account_name [String] The name of the Data Lake Store account to
931
169
  # retrieve.
932
170
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -942,8 +180,8 @@ module Azure::ARM::DataLakeStore
942
180
  #
943
181
  # Gets the specified Data Lake Store account.
944
182
  #
945
- # @param resource_group_name [String] The name of the Azure resource group
946
- # that contains the Data Lake Store account.
183
+ # @param resource_group_name [String] The name of the Azure resource group that
184
+ # contains the Data Lake Store account.
947
185
  # @param account_name [String] The name of the Data Lake Store account to
948
186
  # retrieve.
949
187
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -958,8 +196,8 @@ module Azure::ARM::DataLakeStore
958
196
  #
959
197
  # Gets the specified Data Lake Store account.
960
198
  #
961
- # @param resource_group_name [String] The name of the Azure resource group
962
- # that contains the Data Lake Store account.
199
+ # @param resource_group_name [String] The name of the Azure resource group that
200
+ # contains the Data Lake Store account.
963
201
  # @param account_name [String] The name of the Data Lake Store account to
964
202
  # retrieve.
965
203
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1023,8 +261,8 @@ module Azure::ARM::DataLakeStore
1023
261
  # Attempts to enable a user managed key vault for encryption of the specified
1024
262
  # Data Lake Store account.
1025
263
  #
1026
- # @param resource_group_name [String] The name of the Azure resource group
1027
- # that contains the Data Lake Store account.
264
+ # @param resource_group_name [String] The name of the Azure resource group that
265
+ # contains the Data Lake Store account.
1028
266
  # @param account_name [String] The name of the Data Lake Store account to
1029
267
  # attempt to enable the Key Vault for.
1030
268
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1040,8 +278,8 @@ module Azure::ARM::DataLakeStore
1040
278
  # Attempts to enable a user managed key vault for encryption of the specified
1041
279
  # Data Lake Store account.
1042
280
  #
1043
- # @param resource_group_name [String] The name of the Azure resource group
1044
- # that contains the Data Lake Store account.
281
+ # @param resource_group_name [String] The name of the Azure resource group that
282
+ # contains the Data Lake Store account.
1045
283
  # @param account_name [String] The name of the Data Lake Store account to
1046
284
  # attempt to enable the Key Vault for.
1047
285
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -1057,8 +295,8 @@ module Azure::ARM::DataLakeStore
1057
295
  # Attempts to enable a user managed key vault for encryption of the specified
1058
296
  # Data Lake Store account.
1059
297
  #
1060
- # @param resource_group_name [String] The name of the Azure resource group
1061
- # that contains the Data Lake Store account.
298
+ # @param resource_group_name [String] The name of the Azure resource group that
299
+ # contains the Data Lake Store account.
1062
300
  # @param account_name [String] The name of the Data Lake Store account to
1063
301
  # attempt to enable the Key Vault for.
1064
302
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -1112,15 +350,12 @@ module Azure::ARM::DataLakeStore
1112
350
  # Lists the Data Lake Store accounts within a specific resource group. The
1113
351
  # response includes a link to the next page of results, if any.
1114
352
  #
1115
- # @param resource_group_name [String] The name of the Azure resource group
1116
- # that contains the Data Lake Store account(s).
353
+ # @param resource_group_name [String] The name of the Azure resource group that
354
+ # contains the Data Lake Store account(s).
1117
355
  # @param filter [String] OData filter. Optional.
1118
356
  # @param top [Integer] The number of items to return. Optional.
1119
357
  # @param skip [Integer] The number of items to skip over before returning
1120
358
  # elements. Optional.
1121
- # @param expand [String] OData expansion. Expand related resources in line
1122
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1123
- # Product data in line with each Category entry. Optional.
1124
359
  # @param select [String] OData Select statement. Limits the properties on each
1125
360
  # entry to just those requested, e.g.
1126
361
  # Categories?$select=CategoryName,Description. Optional.
@@ -1128,45 +363,132 @@ module Azure::ARM::DataLakeStore
1128
363
  # expressions with an optional "asc" (the default) or "desc" depending on the
1129
364
  # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1130
365
  # desc. Optional.
1131
- # @param count [Boolean] A Boolean value of true or false to request a count
1132
- # of the matching resources included with the resources in the response, e.g.
366
+ # @param count [Boolean] A Boolean value of true or false to request a count of
367
+ # the matching resources included with the resources in the response, e.g.
1133
368
  # Categories?$count=true. Optional.
1134
- # @param search [String] A free form search. A free-text search expression to
1135
- # match for whether a particular entry should be included in the feed, e.g.
1136
- # Categories?$search=blue OR green. Optional.
1137
- # @param format [String] The desired return format. Return the response in
1138
- # particular formatxii without access to request headers for standard
1139
- # content-type negotiation (e.g Orders?$format=json). Optional.
1140
369
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1141
370
  # will be added to the HTTP request.
1142
371
  #
1143
- # @return [DataLakeStoreAccountListResult] which provide lazy access to pages
1144
- # of the response.
372
+ # @return [Array<DataLakeStoreAccount>] operation results.
1145
373
  #
1146
- def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1147
- response = list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1148
- unless response.nil?
1149
- page = response.body
1150
- page.next_method = Proc.new do |next_page_link|
1151
- list_by_resource_group_next_async(next_page_link, custom_headers)
1152
- end
1153
- page
1154
- end
374
+ def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
375
+ first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, select, orderby, count, custom_headers)
376
+ first_page.get_all_items
377
+ end
378
+
379
+ #
380
+ # Lists the Data Lake Store accounts within a specific resource group. The
381
+ # response includes a link to the next page of results, if any.
382
+ #
383
+ # @param resource_group_name [String] The name of the Azure resource group that
384
+ # contains the Data Lake Store account(s).
385
+ # @param filter [String] OData filter. Optional.
386
+ # @param top [Integer] The number of items to return. Optional.
387
+ # @param skip [Integer] The number of items to skip over before returning
388
+ # elements. Optional.
389
+ # @param select [String] OData Select statement. Limits the properties on each
390
+ # entry to just those requested, e.g.
391
+ # Categories?$select=CategoryName,Description. Optional.
392
+ # @param orderby [String] OrderBy clause. One or more comma-separated
393
+ # expressions with an optional "asc" (the default) or "desc" depending on the
394
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
395
+ # desc. Optional.
396
+ # @param count [Boolean] A Boolean value of true or false to request a count of
397
+ # the matching resources included with the resources in the response, e.g.
398
+ # Categories?$count=true. Optional.
399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
400
+ # will be added to the HTTP request.
401
+ #
402
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
403
+ #
404
+ def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
405
+ list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value!
1155
406
  end
1156
407
 
1157
408
  #
1158
409
  # Lists the Data Lake Store accounts within a specific resource group. The
1159
410
  # response includes a link to the next page of results, if any.
1160
411
  #
1161
- # @param resource_group_name [String] The name of the Azure resource group
1162
- # that contains the Data Lake Store account(s).
412
+ # @param resource_group_name [String] The name of the Azure resource group that
413
+ # contains the Data Lake Store account(s).
414
+ # @param filter [String] OData filter. Optional.
415
+ # @param top [Integer] The number of items to return. Optional.
416
+ # @param skip [Integer] The number of items to skip over before returning
417
+ # elements. Optional.
418
+ # @param select [String] OData Select statement. Limits the properties on each
419
+ # entry to just those requested, e.g.
420
+ # Categories?$select=CategoryName,Description. Optional.
421
+ # @param orderby [String] OrderBy clause. One or more comma-separated
422
+ # expressions with an optional "asc" (the default) or "desc" depending on the
423
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
424
+ # desc. Optional.
425
+ # @param count [Boolean] A Boolean value of true or false to request a count of
426
+ # the matching resources included with the resources in the response, e.g.
427
+ # Categories?$count=true. Optional.
428
+ # @param [Hash{String => String}] A hash of custom headers that will be added
429
+ # to the HTTP request.
430
+ #
431
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
432
+ #
433
+ def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
434
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
435
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
436
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
437
+
438
+
439
+ request_headers = {}
440
+
441
+ # Set Headers
442
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
443
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
444
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts'
445
+
446
+ request_url = @base_url || @client.base_url
447
+
448
+ options = {
449
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
450
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
451
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$select' => select,'$orderby' => orderby,'$count' => count,'api-version' => @client.api_version},
452
+ headers: request_headers.merge(custom_headers || {}),
453
+ base_url: request_url
454
+ }
455
+ promise = @client.make_request_async(:get, path_template, options)
456
+
457
+ promise = promise.then do |result|
458
+ http_response = result.response
459
+ status_code = http_response.status
460
+ response_content = http_response.body
461
+ unless status_code == 200
462
+ error_model = JSON.load(response_content)
463
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
464
+ end
465
+
466
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
467
+ # Deserialize Response
468
+ if status_code == 200
469
+ begin
470
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
471
+ result_mapper = DataLakeStoreAccountListResult.mapper()
472
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
473
+ rescue Exception => e
474
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
475
+ end
476
+ end
477
+
478
+ result
479
+ end
480
+
481
+ promise.execute
482
+ end
483
+
484
+ #
485
+ # Lists the Data Lake Store accounts within the subscription. The response
486
+ # includes a link to the next page of results, if any.
487
+ #
1163
488
  # @param filter [String] OData filter. Optional.
1164
489
  # @param top [Integer] The number of items to return. Optional.
1165
490
  # @param skip [Integer] The number of items to skip over before returning
1166
491
  # elements. Optional.
1167
- # @param expand [String] OData expansion. Expand related resources in line
1168
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1169
- # Product data in line with each Category entry. Optional.
1170
492
  # @param select [String] OData Select statement. Limits the properties on each
1171
493
  # entry to just those requested, e.g.
1172
494
  # Categories?$select=CategoryName,Description. Optional.
@@ -1174,38 +496,27 @@ module Azure::ARM::DataLakeStore
1174
496
  # expressions with an optional "asc" (the default) or "desc" depending on the
1175
497
  # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1176
498
  # desc. Optional.
1177
- # @param count [Boolean] A Boolean value of true or false to request a count
499
+ # @param count [Boolean] The Boolean value of true or false to request a count
1178
500
  # of the matching resources included with the resources in the response, e.g.
1179
501
  # Categories?$count=true. Optional.
1180
- # @param search [String] A free form search. A free-text search expression to
1181
- # match for whether a particular entry should be included in the feed, e.g.
1182
- # Categories?$search=blue OR green. Optional.
1183
- # @param format [String] The desired return format. Return the response in
1184
- # particular formatxii without access to request headers for standard
1185
- # content-type negotiation (e.g Orders?$format=json). Optional.
1186
502
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1187
503
  # will be added to the HTTP request.
1188
504
  #
1189
505
  # @return [Array<DataLakeStoreAccount>] operation results.
1190
506
  #
1191
- def list_by_resource_group(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1192
- first_page = list_by_resource_group_as_lazy(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
507
+ def list(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
508
+ first_page = list_as_lazy(filter, top, skip, select, orderby, count, custom_headers)
1193
509
  first_page.get_all_items
1194
510
  end
1195
511
 
1196
512
  #
1197
- # Lists the Data Lake Store accounts within a specific resource group. The
1198
- # response includes a link to the next page of results, if any.
513
+ # Lists the Data Lake Store accounts within the subscription. The response
514
+ # includes a link to the next page of results, if any.
1199
515
  #
1200
- # @param resource_group_name [String] The name of the Azure resource group
1201
- # that contains the Data Lake Store account(s).
1202
516
  # @param filter [String] OData filter. Optional.
1203
517
  # @param top [Integer] The number of items to return. Optional.
1204
518
  # @param skip [Integer] The number of items to skip over before returning
1205
519
  # elements. Optional.
1206
- # @param expand [String] OData expansion. Expand related resources in line
1207
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1208
- # Product data in line with each Category entry. Optional.
1209
520
  # @param select [String] OData Select statement. Limits the properties on each
1210
521
  # entry to just those requested, e.g.
1211
522
  # Categories?$select=CategoryName,Description. Optional.
@@ -1213,37 +524,26 @@ module Azure::ARM::DataLakeStore
1213
524
  # expressions with an optional "asc" (the default) or "desc" depending on the
1214
525
  # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1215
526
  # desc. Optional.
1216
- # @param count [Boolean] A Boolean value of true or false to request a count
527
+ # @param count [Boolean] The Boolean value of true or false to request a count
1217
528
  # of the matching resources included with the resources in the response, e.g.
1218
529
  # Categories?$count=true. Optional.
1219
- # @param search [String] A free form search. A free-text search expression to
1220
- # match for whether a particular entry should be included in the feed, e.g.
1221
- # Categories?$search=blue OR green. Optional.
1222
- # @param format [String] The desired return format. Return the response in
1223
- # particular formatxii without access to request headers for standard
1224
- # content-type negotiation (e.g Orders?$format=json). Optional.
1225
530
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1226
531
  # will be added to the HTTP request.
1227
532
  #
1228
533
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1229
534
  #
1230
- def list_by_resource_group_with_http_info(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1231
- list_by_resource_group_async(resource_group_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
535
+ def list_with_http_info(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
536
+ list_async(filter, top, skip, select, orderby, count, custom_headers).value!
1232
537
  end
1233
538
 
1234
539
  #
1235
- # Lists the Data Lake Store accounts within a specific resource group. The
1236
- # response includes a link to the next page of results, if any.
540
+ # Lists the Data Lake Store accounts within the subscription. The response
541
+ # includes a link to the next page of results, if any.
1237
542
  #
1238
- # @param resource_group_name [String] The name of the Azure resource group
1239
- # that contains the Data Lake Store account(s).
1240
543
  # @param filter [String] OData filter. Optional.
1241
544
  # @param top [Integer] The number of items to return. Optional.
1242
545
  # @param skip [Integer] The number of items to skip over before returning
1243
546
  # elements. Optional.
1244
- # @param expand [String] OData expansion. Expand related resources in line
1245
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1246
- # Product data in line with each Category entry. Optional.
1247
547
  # @param select [String] OData Select statement. Limits the properties on each
1248
548
  # entry to just those requested, e.g.
1249
549
  # Categories?$select=CategoryName,Description. Optional.
@@ -1251,59 +551,172 @@ module Azure::ARM::DataLakeStore
1251
551
  # expressions with an optional "asc" (the default) or "desc" depending on the
1252
552
  # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1253
553
  # desc. Optional.
1254
- # @param count [Boolean] A Boolean value of true or false to request a count
554
+ # @param count [Boolean] The Boolean value of true or false to request a count
1255
555
  # of the matching resources included with the resources in the response, e.g.
1256
556
  # Categories?$count=true. Optional.
1257
- # @param search [String] A free form search. A free-text search expression to
1258
- # match for whether a particular entry should be included in the feed, e.g.
1259
- # Categories?$search=blue OR green. Optional.
1260
- # @param format [String] The desired return format. Return the response in
1261
- # particular formatxii without access to request headers for standard
1262
- # content-type negotiation (e.g Orders?$format=json). Optional.
1263
557
  # @param [Hash{String => String}] A hash of custom headers that will be added
1264
558
  # to the HTTP request.
1265
559
  #
1266
560
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1267
561
  #
1268
- def list_by_resource_group_async(resource_group_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
562
+ def list_async(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
563
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
564
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
565
+
566
+
567
+ request_headers = {}
568
+
569
+ # Set Headers
570
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
571
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
572
+ path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts'
573
+
574
+ request_url = @base_url || @client.base_url
575
+
576
+ options = {
577
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
578
+ path_params: {'subscriptionId' => @client.subscription_id},
579
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$select' => select,'$orderby' => orderby,'$count' => count,'api-version' => @client.api_version},
580
+ headers: request_headers.merge(custom_headers || {}),
581
+ base_url: request_url
582
+ }
583
+ promise = @client.make_request_async(:get, path_template, options)
584
+
585
+ promise = promise.then do |result|
586
+ http_response = result.response
587
+ status_code = http_response.status
588
+ response_content = http_response.body
589
+ unless status_code == 200
590
+ error_model = JSON.load(response_content)
591
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
592
+ end
593
+
594
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
595
+ # Deserialize Response
596
+ if status_code == 200
597
+ begin
598
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
599
+ result_mapper = DataLakeStoreAccountListResult.mapper()
600
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
601
+ rescue Exception => e
602
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
603
+ end
604
+ end
605
+
606
+ result
607
+ end
608
+
609
+ promise.execute
610
+ end
611
+
612
+ #
613
+ # Creates the specified Data Lake Store account.
614
+ #
615
+ # @param resource_group_name [String] The name of the Azure resource group that
616
+ # contains the Data Lake Store account.
617
+ # @param name [String] The name of the Data Lake Store account to create.
618
+ # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
619
+ # Data Lake Store account.
620
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
621
+ # will be added to the HTTP request.
622
+ #
623
+ # @return [DataLakeStoreAccount] operation results.
624
+ #
625
+ def begin_create(resource_group_name, name, parameters, custom_headers = nil)
626
+ response = begin_create_async(resource_group_name, name, parameters, custom_headers).value!
627
+ response.body unless response.nil?
628
+ end
629
+
630
+ #
631
+ # Creates the specified Data Lake Store account.
632
+ #
633
+ # @param resource_group_name [String] The name of the Azure resource group that
634
+ # contains the Data Lake Store account.
635
+ # @param name [String] The name of the Data Lake Store account to create.
636
+ # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
637
+ # Data Lake Store account.
638
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
639
+ # will be added to the HTTP request.
640
+ #
641
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
642
+ #
643
+ def begin_create_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
644
+ begin_create_async(resource_group_name, name, parameters, custom_headers).value!
645
+ end
646
+
647
+ #
648
+ # Creates the specified Data Lake Store account.
649
+ #
650
+ # @param resource_group_name [String] The name of the Azure resource group that
651
+ # contains the Data Lake Store account.
652
+ # @param name [String] The name of the Data Lake Store account to create.
653
+ # @param parameters [DataLakeStoreAccount] Parameters supplied to create the
654
+ # Data Lake Store account.
655
+ # @param [Hash{String => String}] A hash of custom headers that will be added
656
+ # to the HTTP request.
657
+ #
658
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
659
+ #
660
+ def begin_create_async(resource_group_name, name, parameters, custom_headers = nil)
1269
661
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
662
+ fail ArgumentError, 'name is nil' if name.nil?
663
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1270
664
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1271
665
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1272
666
 
1273
667
 
1274
668
  request_headers = {}
1275
669
 
1276
- # Set Headers
1277
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1278
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1279
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts'
670
+ # Set Headers
671
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
672
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
673
+
674
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
675
+
676
+ # Serialize Request
677
+ request_mapper = DataLakeStoreAccount.mapper()
678
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
679
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
680
+
681
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'
1280
682
 
1281
683
  request_url = @base_url || @client.base_url
1282
684
 
1283
685
  options = {
1284
686
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1285
- path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
1286
- query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
687
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
688
+ query_params: {'api-version' => @client.api_version},
689
+ body: request_content,
1287
690
  headers: request_headers.merge(custom_headers || {}),
1288
691
  base_url: request_url
1289
692
  }
1290
- promise = @client.make_request_async(:get, path_template, options)
693
+ promise = @client.make_request_async(:put, path_template, options)
1291
694
 
1292
695
  promise = promise.then do |result|
1293
696
  http_response = result.response
1294
697
  status_code = http_response.status
1295
698
  response_content = http_response.body
1296
- unless status_code == 200
699
+ unless status_code == 201 || status_code == 200
1297
700
  error_model = JSON.load(response_content)
1298
701
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1299
702
  end
1300
703
 
1301
704
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1302
705
  # Deserialize Response
706
+ if status_code == 201
707
+ begin
708
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
709
+ result_mapper = DataLakeStoreAccount.mapper()
710
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
711
+ rescue Exception => e
712
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
713
+ end
714
+ end
715
+ # Deserialize Response
1303
716
  if status_code == 200
1304
717
  begin
1305
718
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1306
- result_mapper = DataLakeStoreAccountListResult.mapper()
719
+ result_mapper = DataLakeStoreAccount.mapper()
1307
720
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1308
721
  rescue Exception => e
1309
722
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1317,155 +730,57 @@ module Azure::ARM::DataLakeStore
1317
730
  end
1318
731
 
1319
732
  #
1320
- # Lists the Data Lake Store accounts within the subscription. The response
1321
- # includes a link to the next page of results, if any.
1322
- #
1323
- # @param filter [String] OData filter. Optional.
1324
- # @param top [Integer] The number of items to return. Optional.
1325
- # @param skip [Integer] The number of items to skip over before returning
1326
- # elements. Optional.
1327
- # @param expand [String] OData expansion. Expand related resources in line
1328
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1329
- # Product data in line with each Category entry. Optional.
1330
- # @param select [String] OData Select statement. Limits the properties on each
1331
- # entry to just those requested, e.g.
1332
- # Categories?$select=CategoryName,Description. Optional.
1333
- # @param orderby [String] OrderBy clause. One or more comma-separated
1334
- # expressions with an optional "asc" (the default) or "desc" depending on the
1335
- # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1336
- # desc. Optional.
1337
- # @param count [Boolean] The Boolean value of true or false to request a count
1338
- # of the matching resources included with the resources in the response, e.g.
1339
- # Categories?$count=true. Optional.
1340
- # @param search [String] A free form search. A free-text search expression to
1341
- # match for whether a particular entry should be included in the feed, e.g.
1342
- # Categories?$search=blue OR green. Optional.
1343
- # @param format [String] The desired return format. Return the response in
1344
- # particular formatxii without access to request headers for standard
1345
- # content-type negotiation (e.g Orders?$format=json). Optional.
1346
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1347
- # will be added to the HTTP request.
1348
- #
1349
- # @return [DataLakeStoreAccountListResult] which provide lazy access to pages
1350
- # of the response.
1351
- #
1352
- def list_as_lazy(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1353
- response = list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
1354
- unless response.nil?
1355
- page = response.body
1356
- page.next_method = Proc.new do |next_page_link|
1357
- list_next_async(next_page_link, custom_headers)
1358
- end
1359
- page
1360
- end
1361
- end
1362
-
1363
- #
1364
- # Lists the Data Lake Store accounts within the subscription. The response
1365
- # includes a link to the next page of results, if any.
733
+ # Updates the specified Data Lake Store account information.
1366
734
  #
1367
- # @param filter [String] OData filter. Optional.
1368
- # @param top [Integer] The number of items to return. Optional.
1369
- # @param skip [Integer] The number of items to skip over before returning
1370
- # elements. Optional.
1371
- # @param expand [String] OData expansion. Expand related resources in line
1372
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1373
- # Product data in line with each Category entry. Optional.
1374
- # @param select [String] OData Select statement. Limits the properties on each
1375
- # entry to just those requested, e.g.
1376
- # Categories?$select=CategoryName,Description. Optional.
1377
- # @param orderby [String] OrderBy clause. One or more comma-separated
1378
- # expressions with an optional "asc" (the default) or "desc" depending on the
1379
- # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1380
- # desc. Optional.
1381
- # @param count [Boolean] The Boolean value of true or false to request a count
1382
- # of the matching resources included with the resources in the response, e.g.
1383
- # Categories?$count=true. Optional.
1384
- # @param search [String] A free form search. A free-text search expression to
1385
- # match for whether a particular entry should be included in the feed, e.g.
1386
- # Categories?$search=blue OR green. Optional.
1387
- # @param format [String] The desired return format. Return the response in
1388
- # particular formatxii without access to request headers for standard
1389
- # content-type negotiation (e.g Orders?$format=json). Optional.
735
+ # @param resource_group_name [String] The name of the Azure resource group that
736
+ # contains the Data Lake Store account.
737
+ # @param name [String] The name of the Data Lake Store account to update.
738
+ # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied
739
+ # to update the Data Lake Store account.
1390
740
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1391
741
  # will be added to the HTTP request.
1392
742
  #
1393
- # @return [Array<DataLakeStoreAccount>] operation results.
743
+ # @return [DataLakeStoreAccount] operation results.
1394
744
  #
1395
- def list(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1396
- first_page = list_as_lazy(filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
1397
- first_page.get_all_items
745
+ def begin_update(resource_group_name, name, parameters, custom_headers = nil)
746
+ response = begin_update_async(resource_group_name, name, parameters, custom_headers).value!
747
+ response.body unless response.nil?
1398
748
  end
1399
749
 
1400
750
  #
1401
- # Lists the Data Lake Store accounts within the subscription. The response
1402
- # includes a link to the next page of results, if any.
751
+ # Updates the specified Data Lake Store account information.
1403
752
  #
1404
- # @param filter [String] OData filter. Optional.
1405
- # @param top [Integer] The number of items to return. Optional.
1406
- # @param skip [Integer] The number of items to skip over before returning
1407
- # elements. Optional.
1408
- # @param expand [String] OData expansion. Expand related resources in line
1409
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1410
- # Product data in line with each Category entry. Optional.
1411
- # @param select [String] OData Select statement. Limits the properties on each
1412
- # entry to just those requested, e.g.
1413
- # Categories?$select=CategoryName,Description. Optional.
1414
- # @param orderby [String] OrderBy clause. One or more comma-separated
1415
- # expressions with an optional "asc" (the default) or "desc" depending on the
1416
- # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1417
- # desc. Optional.
1418
- # @param count [Boolean] The Boolean value of true or false to request a count
1419
- # of the matching resources included with the resources in the response, e.g.
1420
- # Categories?$count=true. Optional.
1421
- # @param search [String] A free form search. A free-text search expression to
1422
- # match for whether a particular entry should be included in the feed, e.g.
1423
- # Categories?$search=blue OR green. Optional.
1424
- # @param format [String] The desired return format. Return the response in
1425
- # particular formatxii without access to request headers for standard
1426
- # content-type negotiation (e.g Orders?$format=json). Optional.
753
+ # @param resource_group_name [String] The name of the Azure resource group that
754
+ # contains the Data Lake Store account.
755
+ # @param name [String] The name of the Data Lake Store account to update.
756
+ # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied
757
+ # to update the Data Lake Store account.
1427
758
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1428
759
  # will be added to the HTTP request.
1429
760
  #
1430
761
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1431
762
  #
1432
- def list_with_http_info(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
1433
- list_async(filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
763
+ def begin_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
764
+ begin_update_async(resource_group_name, name, parameters, custom_headers).value!
1434
765
  end
1435
766
 
1436
767
  #
1437
- # Lists the Data Lake Store accounts within the subscription. The response
1438
- # includes a link to the next page of results, if any.
768
+ # Updates the specified Data Lake Store account information.
1439
769
  #
1440
- # @param filter [String] OData filter. Optional.
1441
- # @param top [Integer] The number of items to return. Optional.
1442
- # @param skip [Integer] The number of items to skip over before returning
1443
- # elements. Optional.
1444
- # @param expand [String] OData expansion. Expand related resources in line
1445
- # with the retrieved resources, e.g. Categories/$expand=Products would expand
1446
- # Product data in line with each Category entry. Optional.
1447
- # @param select [String] OData Select statement. Limits the properties on each
1448
- # entry to just those requested, e.g.
1449
- # Categories?$select=CategoryName,Description. Optional.
1450
- # @param orderby [String] OrderBy clause. One or more comma-separated
1451
- # expressions with an optional "asc" (the default) or "desc" depending on the
1452
- # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1453
- # desc. Optional.
1454
- # @param count [Boolean] The Boolean value of true or false to request a count
1455
- # of the matching resources included with the resources in the response, e.g.
1456
- # Categories?$count=true. Optional.
1457
- # @param search [String] A free form search. A free-text search expression to
1458
- # match for whether a particular entry should be included in the feed, e.g.
1459
- # Categories?$search=blue OR green. Optional.
1460
- # @param format [String] The desired return format. Return the response in
1461
- # particular formatxii without access to request headers for standard
1462
- # content-type negotiation (e.g Orders?$format=json). Optional.
770
+ # @param resource_group_name [String] The name of the Azure resource group that
771
+ # contains the Data Lake Store account.
772
+ # @param name [String] The name of the Data Lake Store account to update.
773
+ # @param parameters [DataLakeStoreAccountUpdateParameters] Parameters supplied
774
+ # to update the Data Lake Store account.
1463
775
  # @param [Hash{String => String}] A hash of custom headers that will be added
1464
776
  # to the HTTP request.
1465
777
  #
1466
778
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1467
779
  #
1468
- def list_async(filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
780
+ def begin_update_async(resource_group_name, name, parameters, custom_headers = nil)
781
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
782
+ fail ArgumentError, 'name is nil' if name.nil?
783
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
1469
784
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1470
785
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1471
786
 
@@ -1475,24 +790,33 @@ module Azure::ARM::DataLakeStore
1475
790
  # Set Headers
1476
791
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1477
792
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1478
- path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/accounts'
793
+
794
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
795
+
796
+ # Serialize Request
797
+ request_mapper = DataLakeStoreAccountUpdateParameters.mapper()
798
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
799
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
800
+
801
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{name}'
1479
802
 
1480
803
  request_url = @base_url || @client.base_url
1481
804
 
1482
805
  options = {
1483
806
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1484
- path_params: {'subscriptionId' => @client.subscription_id},
1485
- query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
807
+ path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
808
+ query_params: {'api-version' => @client.api_version},
809
+ body: request_content,
1486
810
  headers: request_headers.merge(custom_headers || {}),
1487
811
  base_url: request_url
1488
812
  }
1489
- promise = @client.make_request_async(:get, path_template, options)
813
+ promise = @client.make_request_async(:patch, path_template, options)
1490
814
 
1491
815
  promise = promise.then do |result|
1492
816
  http_response = result.response
1493
817
  status_code = http_response.status
1494
818
  response_content = http_response.body
1495
- unless status_code == 200
819
+ unless status_code == 200 || status_code == 201
1496
820
  error_model = JSON.load(response_content)
1497
821
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1498
822
  end
@@ -1502,7 +826,17 @@ module Azure::ARM::DataLakeStore
1502
826
  if status_code == 200
1503
827
  begin
1504
828
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1505
- result_mapper = DataLakeStoreAccountListResult.mapper()
829
+ result_mapper = DataLakeStoreAccount.mapper()
830
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
831
+ rescue Exception => e
832
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
833
+ end
834
+ end
835
+ # Deserialize Response
836
+ if status_code == 201
837
+ begin
838
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
839
+ result_mapper = DataLakeStoreAccount.mapper()
1506
840
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1507
841
  rescue Exception => e
1508
842
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -1516,49 +850,54 @@ module Azure::ARM::DataLakeStore
1516
850
  end
1517
851
 
1518
852
  #
1519
- # Lists the Data Lake Store firewall rules within the specified Data Lake
1520
- # Store account.
853
+ # Deletes the specified Data Lake Store account.
1521
854
  #
1522
- # @param next_page_link [String] The NextLink from the previous successful
1523
- # call to List operation.
855
+ # @param resource_group_name [String] The name of the Azure resource group that
856
+ # contains the Data Lake Store account.
857
+ # @param account_name [String] The name of the Data Lake Store account to
858
+ # delete.
1524
859
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1525
860
  # will be added to the HTTP request.
1526
861
  #
1527
- # @return [DataLakeStoreFirewallRuleListResult] operation results.
1528
862
  #
1529
- def list_firewall_rules_next(next_page_link, custom_headers = nil)
1530
- response = list_firewall_rules_next_async(next_page_link, custom_headers).value!
1531
- response.body unless response.nil?
863
+ def begin_delete(resource_group_name, account_name, custom_headers = nil)
864
+ response = begin_delete_async(resource_group_name, account_name, custom_headers).value!
865
+ nil
1532
866
  end
1533
867
 
1534
868
  #
1535
- # Lists the Data Lake Store firewall rules within the specified Data Lake
1536
- # Store account.
869
+ # Deletes the specified Data Lake Store account.
1537
870
  #
1538
- # @param next_page_link [String] The NextLink from the previous successful
1539
- # call to List operation.
871
+ # @param resource_group_name [String] The name of the Azure resource group that
872
+ # contains the Data Lake Store account.
873
+ # @param account_name [String] The name of the Data Lake Store account to
874
+ # delete.
1540
875
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1541
876
  # will be added to the HTTP request.
1542
877
  #
1543
878
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1544
879
  #
1545
- def list_firewall_rules_next_with_http_info(next_page_link, custom_headers = nil)
1546
- list_firewall_rules_next_async(next_page_link, custom_headers).value!
880
+ def begin_delete_with_http_info(resource_group_name, account_name, custom_headers = nil)
881
+ begin_delete_async(resource_group_name, account_name, custom_headers).value!
1547
882
  end
1548
883
 
1549
884
  #
1550
- # Lists the Data Lake Store firewall rules within the specified Data Lake
1551
- # Store account.
885
+ # Deletes the specified Data Lake Store account.
1552
886
  #
1553
- # @param next_page_link [String] The NextLink from the previous successful
1554
- # call to List operation.
887
+ # @param resource_group_name [String] The name of the Azure resource group that
888
+ # contains the Data Lake Store account.
889
+ # @param account_name [String] The name of the Data Lake Store account to
890
+ # delete.
1555
891
  # @param [Hash{String => String}] A hash of custom headers that will be added
1556
892
  # to the HTTP request.
1557
893
  #
1558
894
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1559
895
  #
1560
- def list_firewall_rules_next_async(next_page_link, custom_headers = nil)
1561
- fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
896
+ def begin_delete_async(resource_group_name, account_name, custom_headers = nil)
897
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
898
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
899
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
900
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1562
901
 
1563
902
 
1564
903
  request_headers = {}
@@ -1566,38 +905,29 @@ module Azure::ARM::DataLakeStore
1566
905
  # Set Headers
1567
906
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1568
907
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1569
- path_template = '{nextLink}'
908
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}'
1570
909
 
1571
910
  request_url = @base_url || @client.base_url
1572
911
 
1573
912
  options = {
1574
913
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1575
- skip_encoding_path_params: {'nextLink' => next_page_link},
914
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
915
+ query_params: {'api-version' => @client.api_version},
1576
916
  headers: request_headers.merge(custom_headers || {}),
1577
917
  base_url: request_url
1578
918
  }
1579
- promise = @client.make_request_async(:get, path_template, options)
919
+ promise = @client.make_request_async(:delete, path_template, options)
1580
920
 
1581
921
  promise = promise.then do |result|
1582
922
  http_response = result.response
1583
923
  status_code = http_response.status
1584
924
  response_content = http_response.body
1585
- unless status_code == 200
925
+ unless status_code == 200 || status_code == 204 || status_code == 202
1586
926
  error_model = JSON.load(response_content)
1587
927
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1588
928
  end
1589
929
 
1590
930
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1591
- # Deserialize Response
1592
- if status_code == 200
1593
- begin
1594
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1595
- result_mapper = DataLakeStoreFirewallRuleListResult.mapper()
1596
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1597
- rescue Exception => e
1598
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1599
- end
1600
- end
1601
931
 
1602
932
  result
1603
933
  end
@@ -1609,8 +939,8 @@ module Azure::ARM::DataLakeStore
1609
939
  # Lists the Data Lake Store accounts within a specific resource group. The
1610
940
  # response includes a link to the next page of results, if any.
1611
941
  #
1612
- # @param next_page_link [String] The NextLink from the previous successful
1613
- # call to List operation.
942
+ # @param next_page_link [String] The NextLink from the previous successful call
943
+ # to List operation.
1614
944
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1615
945
  # will be added to the HTTP request.
1616
946
  #
@@ -1625,8 +955,8 @@ module Azure::ARM::DataLakeStore
1625
955
  # Lists the Data Lake Store accounts within a specific resource group. The
1626
956
  # response includes a link to the next page of results, if any.
1627
957
  #
1628
- # @param next_page_link [String] The NextLink from the previous successful
1629
- # call to List operation.
958
+ # @param next_page_link [String] The NextLink from the previous successful call
959
+ # to List operation.
1630
960
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1631
961
  # will be added to the HTTP request.
1632
962
  #
@@ -1640,8 +970,8 @@ module Azure::ARM::DataLakeStore
1640
970
  # Lists the Data Lake Store accounts within a specific resource group. The
1641
971
  # response includes a link to the next page of results, if any.
1642
972
  #
1643
- # @param next_page_link [String] The NextLink from the previous successful
1644
- # call to List operation.
973
+ # @param next_page_link [String] The NextLink from the previous successful call
974
+ # to List operation.
1645
975
  # @param [Hash{String => String}] A hash of custom headers that will be added
1646
976
  # to the HTTP request.
1647
977
  #
@@ -1699,8 +1029,8 @@ module Azure::ARM::DataLakeStore
1699
1029
  # Lists the Data Lake Store accounts within the subscription. The response
1700
1030
  # includes a link to the next page of results, if any.
1701
1031
  #
1702
- # @param next_page_link [String] The NextLink from the previous successful
1703
- # call to List operation.
1032
+ # @param next_page_link [String] The NextLink from the previous successful call
1033
+ # to List operation.
1704
1034
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1705
1035
  # will be added to the HTTP request.
1706
1036
  #
@@ -1715,8 +1045,8 @@ module Azure::ARM::DataLakeStore
1715
1045
  # Lists the Data Lake Store accounts within the subscription. The response
1716
1046
  # includes a link to the next page of results, if any.
1717
1047
  #
1718
- # @param next_page_link [String] The NextLink from the previous successful
1719
- # call to List operation.
1048
+ # @param next_page_link [String] The NextLink from the previous successful call
1049
+ # to List operation.
1720
1050
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1721
1051
  # will be added to the HTTP request.
1722
1052
  #
@@ -1730,8 +1060,8 @@ module Azure::ARM::DataLakeStore
1730
1060
  # Lists the Data Lake Store accounts within the subscription. The response
1731
1061
  # includes a link to the next page of results, if any.
1732
1062
  #
1733
- # @param next_page_link [String] The NextLink from the previous successful
1734
- # call to List operation.
1063
+ # @param next_page_link [String] The NextLink from the previous successful call
1064
+ # to List operation.
1735
1065
  # @param [Hash{String => String}] A hash of custom headers that will be added
1736
1066
  # to the HTTP request.
1737
1067
  #
@@ -1785,5 +1115,77 @@ module Azure::ARM::DataLakeStore
1785
1115
  promise.execute
1786
1116
  end
1787
1117
 
1118
+ #
1119
+ # Lists the Data Lake Store accounts within a specific resource group. The
1120
+ # response includes a link to the next page of results, if any.
1121
+ #
1122
+ # @param resource_group_name [String] The name of the Azure resource group that
1123
+ # contains the Data Lake Store account(s).
1124
+ # @param filter [String] OData filter. Optional.
1125
+ # @param top [Integer] The number of items to return. Optional.
1126
+ # @param skip [Integer] The number of items to skip over before returning
1127
+ # elements. Optional.
1128
+ # @param select [String] OData Select statement. Limits the properties on each
1129
+ # entry to just those requested, e.g.
1130
+ # Categories?$select=CategoryName,Description. Optional.
1131
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1132
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1133
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1134
+ # desc. Optional.
1135
+ # @param count [Boolean] A Boolean value of true or false to request a count of
1136
+ # the matching resources included with the resources in the response, e.g.
1137
+ # Categories?$count=true. Optional.
1138
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1139
+ # will be added to the HTTP request.
1140
+ #
1141
+ # @return [DataLakeStoreAccountListResult] which provide lazy access to pages
1142
+ # of the response.
1143
+ #
1144
+ def list_by_resource_group_as_lazy(resource_group_name, filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
1145
+ response = list_by_resource_group_async(resource_group_name, filter, top, skip, select, orderby, count, custom_headers).value!
1146
+ unless response.nil?
1147
+ page = response.body
1148
+ page.next_method = Proc.new do |next_page_link|
1149
+ list_by_resource_group_next_async(next_page_link, custom_headers)
1150
+ end
1151
+ page
1152
+ end
1153
+ end
1154
+
1155
+ #
1156
+ # Lists the Data Lake Store accounts within the subscription. The response
1157
+ # includes a link to the next page of results, if any.
1158
+ #
1159
+ # @param filter [String] OData filter. Optional.
1160
+ # @param top [Integer] The number of items to return. Optional.
1161
+ # @param skip [Integer] The number of items to skip over before returning
1162
+ # elements. Optional.
1163
+ # @param select [String] OData Select statement. Limits the properties on each
1164
+ # entry to just those requested, e.g.
1165
+ # Categories?$select=CategoryName,Description. Optional.
1166
+ # @param orderby [String] OrderBy clause. One or more comma-separated
1167
+ # expressions with an optional "asc" (the default) or "desc" depending on the
1168
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
1169
+ # desc. Optional.
1170
+ # @param count [Boolean] The Boolean value of true or false to request a count
1171
+ # of the matching resources included with the resources in the response, e.g.
1172
+ # Categories?$count=true. Optional.
1173
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1174
+ # will be added to the HTTP request.
1175
+ #
1176
+ # @return [DataLakeStoreAccountListResult] which provide lazy access to pages
1177
+ # of the response.
1178
+ #
1179
+ def list_as_lazy(filter = nil, top = nil, skip = nil, select = nil, orderby = nil, count = nil, custom_headers = nil)
1180
+ response = list_async(filter, top, skip, select, orderby, count, custom_headers).value!
1181
+ unless response.nil?
1182
+ page = response.body
1183
+ page.next_method = Proc.new do |next_page_link|
1184
+ list_next_async(next_page_link, custom_headers)
1185
+ end
1186
+ page
1187
+ end
1188
+ end
1189
+
1788
1190
  end
1789
1191
  end