azure_mgmt_iot_hub 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_iot_hub.rb +14 -14
  3. data/lib/generated/azure_mgmt_iot_hub/iot_hub_client.rb +14 -1
  4. data/lib/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +480 -480
  5. data/lib/generated/azure_mgmt_iot_hub/models/access_rights.rb +1 -1
  6. data/lib/generated/azure_mgmt_iot_hub/models/capabilities.rb +1 -1
  7. data/lib/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +3 -3
  8. data/lib/generated/azure_mgmt_iot_hub/models/error_details.rb +1 -1
  9. data/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +1 -1
  10. data/lib/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +1 -1
  11. data/lib/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +1 -1
  12. data/lib/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +1 -1
  13. data/lib/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +1 -1
  14. data/lib/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +1 -1
  15. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +1 -1
  16. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +4 -4
  17. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +1 -1
  18. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +3 -3
  19. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +1 -1
  20. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +6 -6
  21. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +1 -1
  22. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +1 -1
  23. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +1 -1
  24. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +1 -1
  25. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +1 -1
  26. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +1 -1
  27. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +5 -5
  28. data/lib/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +1 -1
  29. data/lib/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +1 -1
  30. data/lib/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +1 -1
  31. data/lib/generated/azure_mgmt_iot_hub/models/job_response.rb +1 -1
  32. data/lib/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +1 -1
  33. data/lib/generated/azure_mgmt_iot_hub/models/job_status.rb +1 -1
  34. data/lib/generated/azure_mgmt_iot_hub/models/job_type.rb +1 -1
  35. data/lib/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +1 -1
  36. data/lib/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +1 -1
  37. data/lib/generated/azure_mgmt_iot_hub/models/operation_monitoring_level.rb +1 -1
  38. data/lib/generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb +1 -1
  39. data/lib/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +1 -1
  40. data/lib/generated/azure_mgmt_iot_hub/models/sbaccess_rights.rb +1 -1
  41. data/lib/generated/azure_mgmt_iot_hub/models/shared_access_authorization_rule.rb +2 -1
  42. data/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +1 -1
  43. data/lib/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +1 -1
  44. data/lib/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +1 -1
  45. data/lib/generated/azure_mgmt_iot_hub/module_definition.rb +1 -1
  46. data/lib/generated/azure_mgmt_iot_hub/version.rb +2 -2
  47. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e9e75288de5ed719381e08fcc921dbcc4cb3144
4
- data.tar.gz: 4ace0c0a80fcc8c82b1518277b325215ae971fa5
3
+ metadata.gz: ccea0fcf3dc044e470dd394783041f514459e6da
4
+ data.tar.gz: 49a14112c9f24e8e613af34feeedf8a18cdb5154
5
5
  SHA512:
6
- metadata.gz: 8f93196a160b0ce730cfe3f9ac666392aa54772621ed0bc26c51e26b9bd6444d3d4fb0b1f8bedaac60f834d39fac6c26cc519b01fd3450487563ba26ae721f06
7
- data.tar.gz: 6347eac7ccb429648d266e1ff141c0fc030b345a35d5f2162d3b3cf28d498cf5455bea15b6dce84b54e0005ea61b6dfbf307614038d26577bacf31d21bff55d6
6
+ metadata.gz: 8f6e69cf89d30c4238db80c64c9d577f259ebd2efeff4896f16ae240b210dab63f9d4265d22e1e91ea2f02498dc990f3d69020a14191bfdbb395d017ea9828e7
7
+ data.tar.gz: a15ab3a225803e538ee5abcbb646a1d370de33f12467f8df77ec6b862e03c21dbc96b38358df110ebb7b6b71eea9ee68dd534e7811b3d807d8b2f222885d2697
@@ -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
 
@@ -24,33 +24,33 @@ module Azure::ARM::IotHub
24
24
  autoload :IotHubClient, 'generated/azure_mgmt_iot_hub/iot_hub_client.rb'
25
25
 
26
26
  module Models
27
- autoload :SharedAccessSignatureAuthorizationRule, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb'
28
- autoload :IotHubProperties, 'generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb'
29
- autoload :IpFilterRule, 'generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb'
30
- autoload :EventHubProperties, 'generated/azure_mgmt_iot_hub/models/event_hub_properties.rb'
31
- autoload :SharedAccessAuthorizationRule, 'generated/azure_mgmt_iot_hub/models/shared_access_authorization_rule.rb'
32
- autoload :StorageEndpointProperties, 'generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb'
33
- autoload :MessagingEndpointProperties, 'generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb'
34
- autoload :CloudToDeviceProperties, 'generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb'
35
- autoload :FeedbackProperties, 'generated/azure_mgmt_iot_hub/models/feedback_properties.rb'
36
- autoload :OperationsMonitoringProperties, 'generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb'
37
- autoload :IotHubSkuInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb'
38
- autoload :SharedAccessSignatureAuthorizationRuleListResult, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb'
39
- autoload :ErrorDetails, 'generated/azure_mgmt_iot_hub/models/error_details.rb'
40
27
  autoload :IotHubQuotaMetricInfoListResult, 'generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb'
28
+ autoload :SharedAccessSignatureAuthorizationRule, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb'
41
29
  autoload :IotHubQuotaMetricInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb'
30
+ autoload :IpFilterRule, 'generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb'
42
31
  autoload :RegistryStatistics, 'generated/azure_mgmt_iot_hub/models/registry_statistics.rb'
32
+ autoload :SharedAccessAuthorizationRule, 'generated/azure_mgmt_iot_hub/models/shared_access_authorization_rule.rb'
43
33
  autoload :JobResponseListResult, 'generated/azure_mgmt_iot_hub/models/job_response_list_result.rb'
34
+ autoload :MessagingEndpointProperties, 'generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb'
44
35
  autoload :JobResponse, 'generated/azure_mgmt_iot_hub/models/job_response.rb'
36
+ autoload :FeedbackProperties, 'generated/azure_mgmt_iot_hub/models/feedback_properties.rb'
45
37
  autoload :IotHubSkuDescription, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb'
38
+ autoload :IotHubSkuInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb'
46
39
  autoload :IotHubCapacity, 'generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb'
47
40
  autoload :EventHubConsumerGroupsListResult, 'generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb'
41
+ autoload :ErrorDetails, 'generated/azure_mgmt_iot_hub/models/error_details.rb'
48
42
  autoload :EventHubConsumerGroupInfo, 'generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb'
43
+ autoload :EventHubProperties, 'generated/azure_mgmt_iot_hub/models/event_hub_properties.rb'
49
44
  autoload :IotHubSkuDescriptionListResult, 'generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb'
45
+ autoload :CloudToDeviceProperties, 'generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb'
50
46
  autoload :IotHubDescriptionListResult, 'generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb'
47
+ autoload :SharedAccessSignatureAuthorizationRuleListResult, 'generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb'
51
48
  autoload :OperationInputs, 'generated/azure_mgmt_iot_hub/models/operation_inputs.rb'
49
+ autoload :StorageEndpointProperties, 'generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb'
52
50
  autoload :IotHubNameAvailabilityInfo, 'generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb'
51
+ autoload :IotHubProperties, 'generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb'
53
52
  autoload :ExportDevicesRequest, 'generated/azure_mgmt_iot_hub/models/export_devices_request.rb'
53
+ autoload :OperationsMonitoringProperties, 'generated/azure_mgmt_iot_hub/models/operations_monitoring_properties.rb'
54
54
  autoload :ImportDevicesRequest, 'generated/azure_mgmt_iot_hub/models/import_devices_request.rb'
55
55
  autoload :IotHubDescription, 'generated/azure_mgmt_iot_hub/models/iot_hub_description.rb'
56
56
  autoload :AccessRights, 'generated/azure_mgmt_iot_hub/models/access_rights.rb'
@@ -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
 
@@ -56,6 +56,7 @@ module Azure::ARM::IotHub
56
56
  @accept_language = 'en-US'
57
57
  @long_running_operation_retry_timeout = 30
58
58
  @generate_client_request_id = true
59
+ add_telemetry
59
60
  end
60
61
 
61
62
  #
@@ -113,5 +114,17 @@ module Azure::ARM::IotHub
113
114
  super(request_url, method, path, options)
114
115
  end
115
116
 
117
+
118
+ private
119
+ #
120
+ # Adds telemetry information.
121
+ #
122
+ def add_telemetry
123
+ sdk_information = 'azure_mgmt_iot_hub'
124
+ if defined? Azure::ARM::IotHub::VERSION
125
+ sdk_information = "#{sdk_information}/#{Azure::ARM::IotHub::VERSION}"
126
+ end
127
+ add_user_agent_information(sdk_information)
128
+ end
116
129
  end
117
130
  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
 
@@ -165,116 +165,6 @@ module Azure::ARM::IotHub
165
165
  promise
166
166
  end
167
167
 
168
- #
169
- # Create or update an IotHub.
170
- #
171
- # Create or update an IotHub.
172
- #
173
- # @param resource_group_name [String] The name of the resource group.
174
- # @param resource_name [String] The name of the resource.
175
- # @param iot_hub_description [IotHubDescription] The Iot hub description.
176
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
177
- # will be added to the HTTP request.
178
- #
179
- # @return [IotHubDescription] operation results.
180
- #
181
- def begin_create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
182
- response = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
183
- response.body unless response.nil?
184
- end
185
-
186
- #
187
- # Create or update an IotHub.
188
- #
189
- # Create or update an IotHub.
190
- #
191
- # @param resource_group_name [String] The name of the resource group.
192
- # @param resource_name [String] The name of the resource.
193
- # @param iot_hub_description [IotHubDescription] The Iot hub description.
194
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
195
- # will be added to the HTTP request.
196
- #
197
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
198
- #
199
- def begin_create_or_update_with_http_info(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
200
- begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
201
- end
202
-
203
- #
204
- # Create or update an IotHub.
205
- #
206
- # Create or update an IotHub.
207
- #
208
- # @param resource_group_name [String] The name of the resource group.
209
- # @param resource_name [String] The name of the resource.
210
- # @param iot_hub_description [IotHubDescription] The Iot hub description.
211
- # @param [Hash{String => String}] A hash of custom headers that will be added
212
- # to the HTTP request.
213
- #
214
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
215
- #
216
- def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
217
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
218
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
219
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
220
- fail ArgumentError, 'resource_name is nil' if resource_name.nil?
221
- fail ArgumentError, 'iot_hub_description is nil' if iot_hub_description.nil?
222
-
223
-
224
- request_headers = {}
225
-
226
- # Set Headers
227
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
228
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
229
-
230
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
231
-
232
- # Serialize Request
233
- request_mapper = IotHubDescription.mapper()
234
- request_content = @client.serialize(request_mapper, iot_hub_description, 'iot_hub_description')
235
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
236
-
237
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'
238
-
239
- request_url = @base_url || @client.base_url
240
-
241
- options = {
242
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
243
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
244
- query_params: {'api-version' => @client.api_version},
245
- body: request_content,
246
- headers: request_headers.merge(custom_headers || {}),
247
- base_url: request_url
248
- }
249
- promise = @client.make_request_async(:put, path_template, options)
250
-
251
- promise = promise.then do |result|
252
- http_response = result.response
253
- status_code = http_response.status
254
- response_content = http_response.body
255
- unless status_code == 201
256
- error_model = JSON.load(response_content)
257
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
258
- end
259
-
260
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
261
- # Deserialize Response
262
- if status_code == 201
263
- begin
264
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
265
- result_mapper = IotHubDescription.mapper()
266
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
267
- rescue Exception => e
268
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
269
- end
270
- end
271
-
272
- result
273
- end
274
-
275
- promise.execute
276
- end
277
-
278
168
  #
279
169
  # Delete an IotHub.
280
170
  #
@@ -319,125 +209,6 @@ module Azure::ARM::IotHub
319
209
  promise
320
210
  end
321
211
 
322
- #
323
- # Delete an IotHub.
324
- #
325
- # Delete an IotHub.
326
- #
327
- # @param resource_group_name [String] The name of the resource group.
328
- # @param resource_name [String] The name of the resource.
329
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
- # will be added to the HTTP request.
331
- #
332
- # @return [IotHubDescription] operation results.
333
- #
334
- def begin_delete(resource_group_name, resource_name, custom_headers = nil)
335
- response = begin_delete_async(resource_group_name, resource_name, custom_headers).value!
336
- response.body unless response.nil?
337
- end
338
-
339
- #
340
- # Delete an IotHub.
341
- #
342
- # Delete an IotHub.
343
- #
344
- # @param resource_group_name [String] The name of the resource group.
345
- # @param resource_name [String] The name of the resource.
346
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
347
- # will be added to the HTTP request.
348
- #
349
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
350
- #
351
- def begin_delete_with_http_info(resource_group_name, resource_name, custom_headers = nil)
352
- begin_delete_async(resource_group_name, resource_name, custom_headers).value!
353
- end
354
-
355
- #
356
- # Delete an IotHub.
357
- #
358
- # Delete an IotHub.
359
- #
360
- # @param resource_group_name [String] The name of the resource group.
361
- # @param resource_name [String] The name of the resource.
362
- # @param [Hash{String => String}] A hash of custom headers that will be added
363
- # to the HTTP request.
364
- #
365
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
366
- #
367
- def begin_delete_async(resource_group_name, resource_name, custom_headers = nil)
368
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
369
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
370
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
371
- fail ArgumentError, 'resource_name is nil' if resource_name.nil?
372
-
373
-
374
- request_headers = {}
375
-
376
- # Set Headers
377
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
378
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
379
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'
380
-
381
- request_url = @base_url || @client.base_url
382
-
383
- options = {
384
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
385
- path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
386
- query_params: {'api-version' => @client.api_version},
387
- headers: request_headers.merge(custom_headers || {}),
388
- base_url: request_url
389
- }
390
- promise = @client.make_request_async(:delete, path_template, options)
391
-
392
- promise = promise.then do |result|
393
- http_response = result.response
394
- status_code = http_response.status
395
- response_content = http_response.body
396
- unless status_code == 202
397
- error_model = JSON.load(response_content)
398
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
399
- end
400
-
401
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
402
- # Deserialize Response
403
- if status_code == 202
404
- begin
405
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
406
- result_mapper = IotHubDescription.mapper()
407
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
408
- rescue Exception => e
409
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
410
- end
411
- end
412
-
413
- result
414
- end
415
-
416
- promise.execute
417
- end
418
-
419
- #
420
- # Get all IotHubs in a subscription.
421
- #
422
- # Get all IotHubs in a subscription.
423
- #
424
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
425
- # will be added to the HTTP request.
426
- #
427
- # @return [IotHubDescriptionListResult] which provide lazy access to pages of
428
- # the response.
429
- #
430
- def list_by_subscription_as_lazy(custom_headers = nil)
431
- response = list_by_subscription_async(custom_headers).value!
432
- unless response.nil?
433
- page = response.body
434
- page.next_method = Proc.new do |next_page_link|
435
- list_by_subscription_next_async(next_page_link, custom_headers)
436
- end
437
- page
438
- end
439
- end
440
-
441
212
  #
442
213
  # Get all IotHubs in a subscription.
443
214
  #
@@ -527,29 +298,6 @@ module Azure::ARM::IotHub
527
298
  promise.execute
528
299
  end
529
300
 
530
- #
531
- # Get all IotHubs in a Resourcegroup.
532
- #
533
- # Get all IotHubs in a Resource group.
534
- #
535
- # @param resource_group_name [String] The name of the resource group.
536
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
537
- # will be added to the HTTP request.
538
- #
539
- # @return [IotHubDescriptionListResult] which provide lazy access to pages of
540
- # the response.
541
- #
542
- def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
543
- response = list_by_resource_group_async(resource_group_name, custom_headers).value!
544
- unless response.nil?
545
- page = response.body
546
- page.next_method = Proc.new do |next_page_link|
547
- list_by_resource_group_next_async(next_page_link, custom_headers)
548
- end
549
- page
550
- end
551
- end
552
-
553
301
  #
554
302
  # Get all IotHubs in a Resourcegroup.
555
303
  #
@@ -740,30 +488,6 @@ module Azure::ARM::IotHub
740
488
  promise.execute
741
489
  end
742
490
 
743
- #
744
- # Get Valid Skus.
745
- #
746
- # Get Valid Skus.
747
- #
748
- # @param resource_group_name [String] The name of the resource group.
749
- # @param resource_name [String] The name of the resource.
750
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
751
- # will be added to the HTTP request.
752
- #
753
- # @return [IotHubSkuDescriptionListResult] which provide lazy access to pages
754
- # of the response.
755
- #
756
- def get_valid_skus_as_lazy(resource_group_name, resource_name, custom_headers = nil)
757
- response = get_valid_skus_async(resource_group_name, resource_name, custom_headers).value!
758
- unless response.nil?
759
- page = response.body
760
- page.next_method = Proc.new do |next_page_link|
761
- get_valid_skus_next_async(next_page_link, custom_headers)
762
- end
763
- page
764
- end
765
- end
766
-
767
491
  #
768
492
  # Get Valid Skus.
769
493
  #
@@ -861,31 +585,6 @@ module Azure::ARM::IotHub
861
585
  promise.execute
862
586
  end
863
587
 
864
- #
865
- # Get EventHub Consumer Groups for an IotHub.
866
- #
867
- # Get EventHub Consumer Groups for an IotHub.
868
- #
869
- # @param resource_group_name [String] The name of the resource group.
870
- # @param resource_name [String] The name of the resource.
871
- # @param event_hub_endpoint_name [String] The name of the event hub endpoint.
872
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
873
- # will be added to the HTTP request.
874
- #
875
- # @return [EventHubConsumerGroupsListResult] which provide lazy access to
876
- # pages of the response.
877
- #
878
- def list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers = nil)
879
- response = list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers).value!
880
- unless response.nil?
881
- page = response.body
882
- page.next_method = Proc.new do |next_page_link|
883
- list_event_hub_consumer_groups_next_async(next_page_link, custom_headers)
884
- end
885
- page
886
- end
887
- end
888
-
889
588
  #
890
589
  # Get EventHub Consumer Groups for an IotHub.
891
590
  #
@@ -1291,30 +990,6 @@ module Azure::ARM::IotHub
1291
990
  promise.execute
1292
991
  end
1293
992
 
1294
- #
1295
- # Get all the jobs in an IotHub.
1296
- #
1297
- # Get all the jobs in an IotHub.
1298
- #
1299
- # @param resource_group_name [String] The name of the resource group.
1300
- # @param resource_name [String] The name of the resource.
1301
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1302
- # will be added to the HTTP request.
1303
- #
1304
- # @return [JobResponseListResult] which provide lazy access to pages of the
1305
- # response.
1306
- #
1307
- def list_jobs_as_lazy(resource_group_name, resource_name, custom_headers = nil)
1308
- response = list_jobs_async(resource_group_name, resource_name, custom_headers).value!
1309
- unless response.nil?
1310
- page = response.body
1311
- page.next_method = Proc.new do |next_page_link|
1312
- list_jobs_next_async(next_page_link, custom_headers)
1313
- end
1314
- page
1315
- end
1316
- end
1317
-
1318
993
  #
1319
994
  # Get all the jobs in an IotHub.
1320
995
  #
@@ -1500,41 +1175,17 @@ module Azure::ARM::IotHub
1500
1175
  if status_code == 200
1501
1176
  begin
1502
1177
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1503
- result_mapper = JobResponse.mapper()
1504
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1505
- rescue Exception => e
1506
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1507
- end
1508
- end
1509
-
1510
- result
1511
- end
1512
-
1513
- promise.execute
1514
- end
1515
-
1516
- #
1517
- # Get quota metrics for an IotHub.
1518
- #
1519
- # Get quota metrics for an IotHub.
1520
- #
1521
- # @param resource_group_name [String] The name of the resource group.
1522
- # @param resource_name [String] The name of the resource.
1523
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1524
- # will be added to the HTTP request.
1525
- #
1526
- # @return [IotHubQuotaMetricInfoListResult] which provide lazy access to pages
1527
- # of the response.
1528
- #
1529
- def get_quota_metrics_as_lazy(resource_group_name, resource_name, custom_headers = nil)
1530
- response = get_quota_metrics_async(resource_group_name, resource_name, custom_headers).value!
1531
- unless response.nil?
1532
- page = response.body
1533
- page.next_method = Proc.new do |next_page_link|
1534
- get_quota_metrics_next_async(next_page_link, custom_headers)
1178
+ result_mapper = JobResponse.mapper()
1179
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1180
+ rescue Exception => e
1181
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1182
+ end
1535
1183
  end
1536
- page
1184
+
1185
+ result
1537
1186
  end
1187
+
1188
+ promise.execute
1538
1189
  end
1539
1190
 
1540
1191
  #
@@ -1739,30 +1390,6 @@ module Azure::ARM::IotHub
1739
1390
  promise.execute
1740
1391
  end
1741
1392
 
1742
- #
1743
- # Get all keys for an IotHub.
1744
- #
1745
- # Get all keys for an IotHub.
1746
- #
1747
- # @param resource_group_name [String] The name of the resource group.
1748
- # @param resource_name [String] The name of the resource.
1749
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
1750
- # will be added to the HTTP request.
1751
- #
1752
- # @return [SharedAccessSignatureAuthorizationRuleListResult] which provide
1753
- # lazy access to pages of the response.
1754
- #
1755
- def list_keys_as_lazy(resource_group_name, resource_name, custom_headers = nil)
1756
- response = list_keys_async(resource_group_name, resource_name, custom_headers).value!
1757
- unless response.nil?
1758
- page = response.body
1759
- page.next_method = Proc.new do |next_page_link|
1760
- list_keys_next_async(next_page_link, custom_headers)
1761
- end
1762
- page
1763
- end
1764
- end
1765
-
1766
1393
  #
1767
1394
  # Get all keys for an IotHub.
1768
1395
  #
@@ -1973,51 +1600,274 @@ module Azure::ARM::IotHub
1973
1600
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1974
1601
  # will be added to the HTTP request.
1975
1602
  #
1976
- # @return [JobResponse] operation results.
1603
+ # @return [JobResponse] operation results.
1604
+ #
1605
+ def export_devices(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1606
+ response = export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers).value!
1607
+ response.body unless response.nil?
1608
+ end
1609
+
1610
+ #
1611
+ # Export all the devices in an IotHub.
1612
+ #
1613
+ # Export all the devices in an IotHub.
1614
+ #
1615
+ # @param resource_group_name [String] The name of the resource group.
1616
+ # @param resource_name [String] The name of the resource.
1617
+ # @param export_devices_parameters [ExportDevicesRequest] The export devices
1618
+ # parameters.
1619
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1620
+ # will be added to the HTTP request.
1621
+ #
1622
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1623
+ #
1624
+ def export_devices_with_http_info(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1625
+ export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers).value!
1626
+ end
1627
+
1628
+ #
1629
+ # Export all the devices in an IotHub.
1630
+ #
1631
+ # Export all the devices in an IotHub.
1632
+ #
1633
+ # @param resource_group_name [String] The name of the resource group.
1634
+ # @param resource_name [String] The name of the resource.
1635
+ # @param export_devices_parameters [ExportDevicesRequest] The export devices
1636
+ # parameters.
1637
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1638
+ # to the HTTP request.
1639
+ #
1640
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1641
+ #
1642
+ def export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1643
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1644
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1645
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1646
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
1647
+ fail ArgumentError, 'export_devices_parameters is nil' if export_devices_parameters.nil?
1648
+
1649
+
1650
+ request_headers = {}
1651
+
1652
+ # Set Headers
1653
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1654
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1655
+
1656
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1657
+
1658
+ # Serialize Request
1659
+ request_mapper = ExportDevicesRequest.mapper()
1660
+ request_content = @client.serialize(request_mapper, export_devices_parameters, 'export_devices_parameters')
1661
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1662
+
1663
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices'
1664
+
1665
+ request_url = @base_url || @client.base_url
1666
+
1667
+ options = {
1668
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1669
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
1670
+ query_params: {'api-version' => @client.api_version},
1671
+ body: request_content,
1672
+ headers: request_headers.merge(custom_headers || {}),
1673
+ base_url: request_url
1674
+ }
1675
+ promise = @client.make_request_async(:post, path_template, options)
1676
+
1677
+ promise = promise.then do |result|
1678
+ http_response = result.response
1679
+ status_code = http_response.status
1680
+ response_content = http_response.body
1681
+ unless status_code == 200
1682
+ error_model = JSON.load(response_content)
1683
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1684
+ end
1685
+
1686
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1687
+ # Deserialize Response
1688
+ if status_code == 200
1689
+ begin
1690
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1691
+ result_mapper = JobResponse.mapper()
1692
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1693
+ rescue Exception => e
1694
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1695
+ end
1696
+ end
1697
+
1698
+ result
1699
+ end
1700
+
1701
+ promise.execute
1702
+ end
1703
+
1704
+ #
1705
+ # Import all the devices in an IotHub.
1706
+ #
1707
+ # Import all the devices in an IotHub.
1708
+ #
1709
+ # @param resource_group_name [String] The name of the resource group.
1710
+ # @param resource_name [String] The name of the resource.
1711
+ # @param import_devices_parameters [ImportDevicesRequest] The import devices
1712
+ # parameters.
1713
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1714
+ # will be added to the HTTP request.
1715
+ #
1716
+ # @return [JobResponse] operation results.
1717
+ #
1718
+ def import_devices(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1719
+ response = import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers).value!
1720
+ response.body unless response.nil?
1721
+ end
1722
+
1723
+ #
1724
+ # Import all the devices in an IotHub.
1725
+ #
1726
+ # Import all the devices in an IotHub.
1727
+ #
1728
+ # @param resource_group_name [String] The name of the resource group.
1729
+ # @param resource_name [String] The name of the resource.
1730
+ # @param import_devices_parameters [ImportDevicesRequest] The import devices
1731
+ # parameters.
1732
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1733
+ # will be added to the HTTP request.
1734
+ #
1735
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1736
+ #
1737
+ def import_devices_with_http_info(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1738
+ import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers).value!
1739
+ end
1740
+
1741
+ #
1742
+ # Import all the devices in an IotHub.
1743
+ #
1744
+ # Import all the devices in an IotHub.
1745
+ #
1746
+ # @param resource_group_name [String] The name of the resource group.
1747
+ # @param resource_name [String] The name of the resource.
1748
+ # @param import_devices_parameters [ImportDevicesRequest] The import devices
1749
+ # parameters.
1750
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1751
+ # to the HTTP request.
1752
+ #
1753
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1754
+ #
1755
+ def import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1756
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1757
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1758
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1759
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
1760
+ fail ArgumentError, 'import_devices_parameters is nil' if import_devices_parameters.nil?
1761
+
1762
+
1763
+ request_headers = {}
1764
+
1765
+ # Set Headers
1766
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1767
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1768
+
1769
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1770
+
1771
+ # Serialize Request
1772
+ request_mapper = ImportDevicesRequest.mapper()
1773
+ request_content = @client.serialize(request_mapper, import_devices_parameters, 'import_devices_parameters')
1774
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1775
+
1776
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices'
1777
+
1778
+ request_url = @base_url || @client.base_url
1779
+
1780
+ options = {
1781
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1782
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
1783
+ query_params: {'api-version' => @client.api_version},
1784
+ body: request_content,
1785
+ headers: request_headers.merge(custom_headers || {}),
1786
+ base_url: request_url
1787
+ }
1788
+ promise = @client.make_request_async(:post, path_template, options)
1789
+
1790
+ promise = promise.then do |result|
1791
+ http_response = result.response
1792
+ status_code = http_response.status
1793
+ response_content = http_response.body
1794
+ unless status_code == 200
1795
+ error_model = JSON.load(response_content)
1796
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1797
+ end
1798
+
1799
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1800
+ # Deserialize Response
1801
+ if status_code == 200
1802
+ begin
1803
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1804
+ result_mapper = JobResponse.mapper()
1805
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1806
+ rescue Exception => e
1807
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1808
+ end
1809
+ end
1810
+
1811
+ result
1812
+ end
1813
+
1814
+ promise.execute
1815
+ end
1816
+
1817
+ #
1818
+ # Create or update an IotHub.
1819
+ #
1820
+ # Create or update an IotHub.
1821
+ #
1822
+ # @param resource_group_name [String] The name of the resource group.
1823
+ # @param resource_name [String] The name of the resource.
1824
+ # @param iot_hub_description [IotHubDescription] The Iot hub description.
1825
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1826
+ # will be added to the HTTP request.
1827
+ #
1828
+ # @return [IotHubDescription] operation results.
1977
1829
  #
1978
- def export_devices(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1979
- response = export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers).value!
1830
+ def begin_create_or_update(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
1831
+ response = begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
1980
1832
  response.body unless response.nil?
1981
1833
  end
1982
1834
 
1983
1835
  #
1984
- # Export all the devices in an IotHub.
1836
+ # Create or update an IotHub.
1985
1837
  #
1986
- # Export all the devices in an IotHub.
1838
+ # Create or update an IotHub.
1987
1839
  #
1988
1840
  # @param resource_group_name [String] The name of the resource group.
1989
1841
  # @param resource_name [String] The name of the resource.
1990
- # @param export_devices_parameters [ExportDevicesRequest] The export devices
1991
- # parameters.
1842
+ # @param iot_hub_description [IotHubDescription] The Iot hub description.
1992
1843
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
1993
1844
  # will be added to the HTTP request.
1994
1845
  #
1995
1846
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1996
1847
  #
1997
- def export_devices_with_http_info(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1998
- export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers).value!
1848
+ def begin_create_or_update_with_http_info(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
1849
+ begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers).value!
1999
1850
  end
2000
1851
 
2001
1852
  #
2002
- # Export all the devices in an IotHub.
1853
+ # Create or update an IotHub.
2003
1854
  #
2004
- # Export all the devices in an IotHub.
1855
+ # Create or update an IotHub.
2005
1856
  #
2006
1857
  # @param resource_group_name [String] The name of the resource group.
2007
1858
  # @param resource_name [String] The name of the resource.
2008
- # @param export_devices_parameters [ExportDevicesRequest] The export devices
2009
- # parameters.
1859
+ # @param iot_hub_description [IotHubDescription] The Iot hub description.
2010
1860
  # @param [Hash{String => String}] A hash of custom headers that will be added
2011
1861
  # to the HTTP request.
2012
1862
  #
2013
1863
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2014
1864
  #
2015
- def export_devices_async(resource_group_name, resource_name, export_devices_parameters, custom_headers = nil)
1865
+ def begin_create_or_update_async(resource_group_name, resource_name, iot_hub_description, custom_headers = nil)
2016
1866
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2017
1867
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2018
1868
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2019
1869
  fail ArgumentError, 'resource_name is nil' if resource_name.nil?
2020
- fail ArgumentError, 'export_devices_parameters is nil' if export_devices_parameters.nil?
1870
+ fail ArgumentError, 'iot_hub_description is nil' if iot_hub_description.nil?
2021
1871
 
2022
1872
 
2023
1873
  request_headers = {}
@@ -2029,11 +1879,11 @@ module Azure::ARM::IotHub
2029
1879
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
2030
1880
 
2031
1881
  # Serialize Request
2032
- request_mapper = ExportDevicesRequest.mapper()
2033
- request_content = @client.serialize(request_mapper, export_devices_parameters, 'export_devices_parameters')
1882
+ request_mapper = IotHubDescription.mapper()
1883
+ request_content = @client.serialize(request_mapper, iot_hub_description, 'iot_hub_description')
2034
1884
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2035
1885
 
2036
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices'
1886
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'
2037
1887
 
2038
1888
  request_url = @base_url || @client.base_url
2039
1889
 
@@ -2045,23 +1895,23 @@ module Azure::ARM::IotHub
2045
1895
  headers: request_headers.merge(custom_headers || {}),
2046
1896
  base_url: request_url
2047
1897
  }
2048
- promise = @client.make_request_async(:post, path_template, options)
1898
+ promise = @client.make_request_async(:put, path_template, options)
2049
1899
 
2050
1900
  promise = promise.then do |result|
2051
1901
  http_response = result.response
2052
1902
  status_code = http_response.status
2053
1903
  response_content = http_response.body
2054
- unless status_code == 200
1904
+ unless status_code == 201
2055
1905
  error_model = JSON.load(response_content)
2056
1906
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2057
1907
  end
2058
1908
 
2059
1909
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2060
1910
  # Deserialize Response
2061
- if status_code == 200
1911
+ if status_code == 201
2062
1912
  begin
2063
1913
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2064
- result_mapper = JobResponse.mapper()
1914
+ result_mapper = IotHubDescription.mapper()
2065
1915
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2066
1916
  rescue Exception => e
2067
1917
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2075,62 +1925,55 @@ module Azure::ARM::IotHub
2075
1925
  end
2076
1926
 
2077
1927
  #
2078
- # Import all the devices in an IotHub.
1928
+ # Delete an IotHub.
2079
1929
  #
2080
- # Import all the devices in an IotHub.
1930
+ # Delete an IotHub.
2081
1931
  #
2082
1932
  # @param resource_group_name [String] The name of the resource group.
2083
1933
  # @param resource_name [String] The name of the resource.
2084
- # @param import_devices_parameters [ImportDevicesRequest] The import devices
2085
- # parameters.
2086
1934
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2087
1935
  # will be added to the HTTP request.
2088
1936
  #
2089
- # @return [JobResponse] operation results.
1937
+ # @return [IotHubDescription] operation results.
2090
1938
  #
2091
- def import_devices(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
2092
- response = import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers).value!
1939
+ def begin_delete(resource_group_name, resource_name, custom_headers = nil)
1940
+ response = begin_delete_async(resource_group_name, resource_name, custom_headers).value!
2093
1941
  response.body unless response.nil?
2094
1942
  end
2095
1943
 
2096
1944
  #
2097
- # Import all the devices in an IotHub.
1945
+ # Delete an IotHub.
2098
1946
  #
2099
- # Import all the devices in an IotHub.
1947
+ # Delete an IotHub.
2100
1948
  #
2101
1949
  # @param resource_group_name [String] The name of the resource group.
2102
1950
  # @param resource_name [String] The name of the resource.
2103
- # @param import_devices_parameters [ImportDevicesRequest] The import devices
2104
- # parameters.
2105
1951
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2106
1952
  # will be added to the HTTP request.
2107
1953
  #
2108
1954
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2109
1955
  #
2110
- def import_devices_with_http_info(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
2111
- import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers).value!
1956
+ def begin_delete_with_http_info(resource_group_name, resource_name, custom_headers = nil)
1957
+ begin_delete_async(resource_group_name, resource_name, custom_headers).value!
2112
1958
  end
2113
1959
 
2114
1960
  #
2115
- # Import all the devices in an IotHub.
1961
+ # Delete an IotHub.
2116
1962
  #
2117
- # Import all the devices in an IotHub.
1963
+ # Delete an IotHub.
2118
1964
  #
2119
1965
  # @param resource_group_name [String] The name of the resource group.
2120
1966
  # @param resource_name [String] The name of the resource.
2121
- # @param import_devices_parameters [ImportDevicesRequest] The import devices
2122
- # parameters.
2123
1967
  # @param [Hash{String => String}] A hash of custom headers that will be added
2124
1968
  # to the HTTP request.
2125
1969
  #
2126
1970
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2127
1971
  #
2128
- def import_devices_async(resource_group_name, resource_name, import_devices_parameters, custom_headers = nil)
1972
+ def begin_delete_async(resource_group_name, resource_name, custom_headers = nil)
2129
1973
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2130
1974
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2131
1975
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2132
1976
  fail ArgumentError, 'resource_name is nil' if resource_name.nil?
2133
- fail ArgumentError, 'import_devices_parameters is nil' if import_devices_parameters.nil?
2134
1977
 
2135
1978
 
2136
1979
  request_headers = {}
@@ -2138,15 +1981,7 @@ module Azure::ARM::IotHub
2138
1981
  # Set Headers
2139
1982
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2140
1983
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2141
-
2142
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
2143
-
2144
- # Serialize Request
2145
- request_mapper = ImportDevicesRequest.mapper()
2146
- request_content = @client.serialize(request_mapper, import_devices_parameters, 'import_devices_parameters')
2147
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2148
-
2149
- path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices'
1984
+ path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}'
2150
1985
 
2151
1986
  request_url = @base_url || @client.base_url
2152
1987
 
@@ -2154,27 +1989,26 @@ module Azure::ARM::IotHub
2154
1989
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2155
1990
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
2156
1991
  query_params: {'api-version' => @client.api_version},
2157
- body: request_content,
2158
1992
  headers: request_headers.merge(custom_headers || {}),
2159
1993
  base_url: request_url
2160
1994
  }
2161
- promise = @client.make_request_async(:post, path_template, options)
1995
+ promise = @client.make_request_async(:delete, path_template, options)
2162
1996
 
2163
1997
  promise = promise.then do |result|
2164
1998
  http_response = result.response
2165
1999
  status_code = http_response.status
2166
2000
  response_content = http_response.body
2167
- unless status_code == 200
2001
+ unless status_code == 202
2168
2002
  error_model = JSON.load(response_content)
2169
2003
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2170
2004
  end
2171
2005
 
2172
2006
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2173
2007
  # Deserialize Response
2174
- if status_code == 200
2008
+ if status_code == 202
2175
2009
  begin
2176
2010
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
2177
- result_mapper = JobResponse.mapper()
2011
+ result_mapper = IotHubDescription.mapper()
2178
2012
  result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
2179
2013
  rescue Exception => e
2180
2014
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -2192,8 +2026,8 @@ module Azure::ARM::IotHub
2192
2026
  #
2193
2027
  # Get all IotHubs in a subscription.
2194
2028
  #
2195
- # @param next_page_link [String] The NextLink from the previous successful
2196
- # call to List operation.
2029
+ # @param next_page_link [String] The NextLink from the previous successful call
2030
+ # to List operation.
2197
2031
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2198
2032
  # will be added to the HTTP request.
2199
2033
  #
@@ -2209,8 +2043,8 @@ module Azure::ARM::IotHub
2209
2043
  #
2210
2044
  # Get all IotHubs in a subscription.
2211
2045
  #
2212
- # @param next_page_link [String] The NextLink from the previous successful
2213
- # call to List operation.
2046
+ # @param next_page_link [String] The NextLink from the previous successful call
2047
+ # to List operation.
2214
2048
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2215
2049
  # will be added to the HTTP request.
2216
2050
  #
@@ -2225,8 +2059,8 @@ module Azure::ARM::IotHub
2225
2059
  #
2226
2060
  # Get all IotHubs in a subscription.
2227
2061
  #
2228
- # @param next_page_link [String] The NextLink from the previous successful
2229
- # call to List operation.
2062
+ # @param next_page_link [String] The NextLink from the previous successful call
2063
+ # to List operation.
2230
2064
  # @param [Hash{String => String}] A hash of custom headers that will be added
2231
2065
  # to the HTTP request.
2232
2066
  #
@@ -2285,8 +2119,8 @@ module Azure::ARM::IotHub
2285
2119
  #
2286
2120
  # Get all IotHubs in a Resource group.
2287
2121
  #
2288
- # @param next_page_link [String] The NextLink from the previous successful
2289
- # call to List operation.
2122
+ # @param next_page_link [String] The NextLink from the previous successful call
2123
+ # to List operation.
2290
2124
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2291
2125
  # will be added to the HTTP request.
2292
2126
  #
@@ -2302,8 +2136,8 @@ module Azure::ARM::IotHub
2302
2136
  #
2303
2137
  # Get all IotHubs in a Resource group.
2304
2138
  #
2305
- # @param next_page_link [String] The NextLink from the previous successful
2306
- # call to List operation.
2139
+ # @param next_page_link [String] The NextLink from the previous successful call
2140
+ # to List operation.
2307
2141
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2308
2142
  # will be added to the HTTP request.
2309
2143
  #
@@ -2318,8 +2152,8 @@ module Azure::ARM::IotHub
2318
2152
  #
2319
2153
  # Get all IotHubs in a Resource group.
2320
2154
  #
2321
- # @param next_page_link [String] The NextLink from the previous successful
2322
- # call to List operation.
2155
+ # @param next_page_link [String] The NextLink from the previous successful call
2156
+ # to List operation.
2323
2157
  # @param [Hash{String => String}] A hash of custom headers that will be added
2324
2158
  # to the HTTP request.
2325
2159
  #
@@ -2378,8 +2212,8 @@ module Azure::ARM::IotHub
2378
2212
  #
2379
2213
  # Get Valid Skus.
2380
2214
  #
2381
- # @param next_page_link [String] The NextLink from the previous successful
2382
- # call to List operation.
2215
+ # @param next_page_link [String] The NextLink from the previous successful call
2216
+ # to List operation.
2383
2217
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2384
2218
  # will be added to the HTTP request.
2385
2219
  #
@@ -2395,8 +2229,8 @@ module Azure::ARM::IotHub
2395
2229
  #
2396
2230
  # Get Valid Skus.
2397
2231
  #
2398
- # @param next_page_link [String] The NextLink from the previous successful
2399
- # call to List operation.
2232
+ # @param next_page_link [String] The NextLink from the previous successful call
2233
+ # to List operation.
2400
2234
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2401
2235
  # will be added to the HTTP request.
2402
2236
  #
@@ -2411,8 +2245,8 @@ module Azure::ARM::IotHub
2411
2245
  #
2412
2246
  # Get Valid Skus.
2413
2247
  #
2414
- # @param next_page_link [String] The NextLink from the previous successful
2415
- # call to List operation.
2248
+ # @param next_page_link [String] The NextLink from the previous successful call
2249
+ # to List operation.
2416
2250
  # @param [Hash{String => String}] A hash of custom headers that will be added
2417
2251
  # to the HTTP request.
2418
2252
  #
@@ -2471,8 +2305,8 @@ module Azure::ARM::IotHub
2471
2305
  #
2472
2306
  # Get EventHub Consumer Groups for an IotHub.
2473
2307
  #
2474
- # @param next_page_link [String] The NextLink from the previous successful
2475
- # call to List operation.
2308
+ # @param next_page_link [String] The NextLink from the previous successful call
2309
+ # to List operation.
2476
2310
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2477
2311
  # will be added to the HTTP request.
2478
2312
  #
@@ -2488,8 +2322,8 @@ module Azure::ARM::IotHub
2488
2322
  #
2489
2323
  # Get EventHub Consumer Groups for an IotHub.
2490
2324
  #
2491
- # @param next_page_link [String] The NextLink from the previous successful
2492
- # call to List operation.
2325
+ # @param next_page_link [String] The NextLink from the previous successful call
2326
+ # to List operation.
2493
2327
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2494
2328
  # will be added to the HTTP request.
2495
2329
  #
@@ -2504,8 +2338,8 @@ module Azure::ARM::IotHub
2504
2338
  #
2505
2339
  # Get EventHub Consumer Groups for an IotHub.
2506
2340
  #
2507
- # @param next_page_link [String] The NextLink from the previous successful
2508
- # call to List operation.
2341
+ # @param next_page_link [String] The NextLink from the previous successful call
2342
+ # to List operation.
2509
2343
  # @param [Hash{String => String}] A hash of custom headers that will be added
2510
2344
  # to the HTTP request.
2511
2345
  #
@@ -2564,8 +2398,8 @@ module Azure::ARM::IotHub
2564
2398
  #
2565
2399
  # Get all the jobs in an IotHub.
2566
2400
  #
2567
- # @param next_page_link [String] The NextLink from the previous successful
2568
- # call to List operation.
2401
+ # @param next_page_link [String] The NextLink from the previous successful call
2402
+ # to List operation.
2569
2403
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2570
2404
  # will be added to the HTTP request.
2571
2405
  #
@@ -2581,8 +2415,8 @@ module Azure::ARM::IotHub
2581
2415
  #
2582
2416
  # Get all the jobs in an IotHub.
2583
2417
  #
2584
- # @param next_page_link [String] The NextLink from the previous successful
2585
- # call to List operation.
2418
+ # @param next_page_link [String] The NextLink from the previous successful call
2419
+ # to List operation.
2586
2420
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2587
2421
  # will be added to the HTTP request.
2588
2422
  #
@@ -2597,8 +2431,8 @@ module Azure::ARM::IotHub
2597
2431
  #
2598
2432
  # Get all the jobs in an IotHub.
2599
2433
  #
2600
- # @param next_page_link [String] The NextLink from the previous successful
2601
- # call to List operation.
2434
+ # @param next_page_link [String] The NextLink from the previous successful call
2435
+ # to List operation.
2602
2436
  # @param [Hash{String => String}] A hash of custom headers that will be added
2603
2437
  # to the HTTP request.
2604
2438
  #
@@ -2657,8 +2491,8 @@ module Azure::ARM::IotHub
2657
2491
  #
2658
2492
  # Get quota metrics for an IotHub.
2659
2493
  #
2660
- # @param next_page_link [String] The NextLink from the previous successful
2661
- # call to List operation.
2494
+ # @param next_page_link [String] The NextLink from the previous successful call
2495
+ # to List operation.
2662
2496
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2663
2497
  # will be added to the HTTP request.
2664
2498
  #
@@ -2674,8 +2508,8 @@ module Azure::ARM::IotHub
2674
2508
  #
2675
2509
  # Get quota metrics for an IotHub.
2676
2510
  #
2677
- # @param next_page_link [String] The NextLink from the previous successful
2678
- # call to List operation.
2511
+ # @param next_page_link [String] The NextLink from the previous successful call
2512
+ # to List operation.
2679
2513
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2680
2514
  # will be added to the HTTP request.
2681
2515
  #
@@ -2690,8 +2524,8 @@ module Azure::ARM::IotHub
2690
2524
  #
2691
2525
  # Get quota metrics for an IotHub.
2692
2526
  #
2693
- # @param next_page_link [String] The NextLink from the previous successful
2694
- # call to List operation.
2527
+ # @param next_page_link [String] The NextLink from the previous successful call
2528
+ # to List operation.
2695
2529
  # @param [Hash{String => String}] A hash of custom headers that will be added
2696
2530
  # to the HTTP request.
2697
2531
  #
@@ -2750,8 +2584,8 @@ module Azure::ARM::IotHub
2750
2584
  #
2751
2585
  # Get all keys for an IotHub.
2752
2586
  #
2753
- # @param next_page_link [String] The NextLink from the previous successful
2754
- # call to List operation.
2587
+ # @param next_page_link [String] The NextLink from the previous successful call
2588
+ # to List operation.
2755
2589
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2756
2590
  # will be added to the HTTP request.
2757
2591
  #
@@ -2767,8 +2601,8 @@ module Azure::ARM::IotHub
2767
2601
  #
2768
2602
  # Get all keys for an IotHub.
2769
2603
  #
2770
- # @param next_page_link [String] The NextLink from the previous successful
2771
- # call to List operation.
2604
+ # @param next_page_link [String] The NextLink from the previous successful call
2605
+ # to List operation.
2772
2606
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
2773
2607
  # will be added to the HTTP request.
2774
2608
  #
@@ -2783,8 +2617,8 @@ module Azure::ARM::IotHub
2783
2617
  #
2784
2618
  # Get all keys for an IotHub.
2785
2619
  #
2786
- # @param next_page_link [String] The NextLink from the previous successful
2787
- # call to List operation.
2620
+ # @param next_page_link [String] The NextLink from the previous successful call
2621
+ # to List operation.
2788
2622
  # @param [Hash{String => String}] A hash of custom headers that will be added
2789
2623
  # to the HTTP request.
2790
2624
  #
@@ -2838,5 +2672,171 @@ module Azure::ARM::IotHub
2838
2672
  promise.execute
2839
2673
  end
2840
2674
 
2675
+ #
2676
+ # Get all IotHubs in a subscription.
2677
+ #
2678
+ # Get all IotHubs in a subscription.
2679
+ #
2680
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2681
+ # will be added to the HTTP request.
2682
+ #
2683
+ # @return [IotHubDescriptionListResult] which provide lazy access to pages of
2684
+ # the response.
2685
+ #
2686
+ def list_by_subscription_as_lazy(custom_headers = nil)
2687
+ response = list_by_subscription_async(custom_headers).value!
2688
+ unless response.nil?
2689
+ page = response.body
2690
+ page.next_method = Proc.new do |next_page_link|
2691
+ list_by_subscription_next_async(next_page_link, custom_headers)
2692
+ end
2693
+ page
2694
+ end
2695
+ end
2696
+
2697
+ #
2698
+ # Get all IotHubs in a Resourcegroup.
2699
+ #
2700
+ # Get all IotHubs in a Resource group.
2701
+ #
2702
+ # @param resource_group_name [String] The name of the resource group.
2703
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2704
+ # will be added to the HTTP request.
2705
+ #
2706
+ # @return [IotHubDescriptionListResult] which provide lazy access to pages of
2707
+ # the response.
2708
+ #
2709
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers = nil)
2710
+ response = list_by_resource_group_async(resource_group_name, custom_headers).value!
2711
+ unless response.nil?
2712
+ page = response.body
2713
+ page.next_method = Proc.new do |next_page_link|
2714
+ list_by_resource_group_next_async(next_page_link, custom_headers)
2715
+ end
2716
+ page
2717
+ end
2718
+ end
2719
+
2720
+ #
2721
+ # Get Valid Skus.
2722
+ #
2723
+ # Get Valid Skus.
2724
+ #
2725
+ # @param resource_group_name [String] The name of the resource group.
2726
+ # @param resource_name [String] The name of the resource.
2727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2728
+ # will be added to the HTTP request.
2729
+ #
2730
+ # @return [IotHubSkuDescriptionListResult] which provide lazy access to pages
2731
+ # of the response.
2732
+ #
2733
+ def get_valid_skus_as_lazy(resource_group_name, resource_name, custom_headers = nil)
2734
+ response = get_valid_skus_async(resource_group_name, resource_name, custom_headers).value!
2735
+ unless response.nil?
2736
+ page = response.body
2737
+ page.next_method = Proc.new do |next_page_link|
2738
+ get_valid_skus_next_async(next_page_link, custom_headers)
2739
+ end
2740
+ page
2741
+ end
2742
+ end
2743
+
2744
+ #
2745
+ # Get EventHub Consumer Groups for an IotHub.
2746
+ #
2747
+ # Get EventHub Consumer Groups for an IotHub.
2748
+ #
2749
+ # @param resource_group_name [String] The name of the resource group.
2750
+ # @param resource_name [String] The name of the resource.
2751
+ # @param event_hub_endpoint_name [String] The name of the event hub endpoint.
2752
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2753
+ # will be added to the HTTP request.
2754
+ #
2755
+ # @return [EventHubConsumerGroupsListResult] which provide lazy access to pages
2756
+ # of the response.
2757
+ #
2758
+ def list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers = nil)
2759
+ response = list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers).value!
2760
+ unless response.nil?
2761
+ page = response.body
2762
+ page.next_method = Proc.new do |next_page_link|
2763
+ list_event_hub_consumer_groups_next_async(next_page_link, custom_headers)
2764
+ end
2765
+ page
2766
+ end
2767
+ end
2768
+
2769
+ #
2770
+ # Get all the jobs in an IotHub.
2771
+ #
2772
+ # Get all the jobs in an IotHub.
2773
+ #
2774
+ # @param resource_group_name [String] The name of the resource group.
2775
+ # @param resource_name [String] The name of the resource.
2776
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2777
+ # will be added to the HTTP request.
2778
+ #
2779
+ # @return [JobResponseListResult] which provide lazy access to pages of the
2780
+ # response.
2781
+ #
2782
+ def list_jobs_as_lazy(resource_group_name, resource_name, custom_headers = nil)
2783
+ response = list_jobs_async(resource_group_name, resource_name, custom_headers).value!
2784
+ unless response.nil?
2785
+ page = response.body
2786
+ page.next_method = Proc.new do |next_page_link|
2787
+ list_jobs_next_async(next_page_link, custom_headers)
2788
+ end
2789
+ page
2790
+ end
2791
+ end
2792
+
2793
+ #
2794
+ # Get quota metrics for an IotHub.
2795
+ #
2796
+ # Get quota metrics for an IotHub.
2797
+ #
2798
+ # @param resource_group_name [String] The name of the resource group.
2799
+ # @param resource_name [String] The name of the resource.
2800
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2801
+ # will be added to the HTTP request.
2802
+ #
2803
+ # @return [IotHubQuotaMetricInfoListResult] which provide lazy access to pages
2804
+ # of the response.
2805
+ #
2806
+ def get_quota_metrics_as_lazy(resource_group_name, resource_name, custom_headers = nil)
2807
+ response = get_quota_metrics_async(resource_group_name, resource_name, custom_headers).value!
2808
+ unless response.nil?
2809
+ page = response.body
2810
+ page.next_method = Proc.new do |next_page_link|
2811
+ get_quota_metrics_next_async(next_page_link, custom_headers)
2812
+ end
2813
+ page
2814
+ end
2815
+ end
2816
+
2817
+ #
2818
+ # Get all keys for an IotHub.
2819
+ #
2820
+ # Get all keys for an IotHub.
2821
+ #
2822
+ # @param resource_group_name [String] The name of the resource group.
2823
+ # @param resource_name [String] The name of the resource.
2824
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2825
+ # will be added to the HTTP request.
2826
+ #
2827
+ # @return [SharedAccessSignatureAuthorizationRuleListResult] which provide lazy
2828
+ # access to pages of the response.
2829
+ #
2830
+ def list_keys_as_lazy(resource_group_name, resource_name, custom_headers = nil)
2831
+ response = list_keys_async(resource_group_name, resource_name, custom_headers).value!
2832
+ unless response.nil?
2833
+ page = response.body
2834
+ page.next_method = Proc.new do |next_page_link|
2835
+ list_keys_next_async(next_page_link, custom_headers)
2836
+ end
2837
+ page
2838
+ end
2839
+ end
2840
+
2841
2841
  end
2842
2842
  end