azure_mgmt_event_hub 0.15.2 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/consumer_groups.rb +33 -30
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +4 -1
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/event_hubs.rb +78 -72
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/namespaces.rb +113 -107
- data/lib/2015-08-01/generated/azure_mgmt_event_hub/operations.rb +15 -13
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/consumer_groups.rb +33 -30
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/disaster_recovery_configs.rb +595 -40
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hub_management_client.rb +4 -1
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/event_hubs.rb +78 -72
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/arm_disaster_recovery.rb +14 -2
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/capture_description.rb +3 -2
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/models/eventhub.rb +0 -2
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/namespaces.rb +113 -107
- data/lib/2017-04-01/generated/azure_mgmt_event_hub/operations.rb +15 -13
- data/lib/profiles/latest/eventhub_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/eventhub_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/eventhub_profile_module.rb +128 -109
- data/lib/version.rb +1 -1
- metadata +3 -3
@@ -29,8 +29,8 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
29
29
|
#
|
30
30
|
# @return [Array<Operation>] operation results.
|
31
31
|
#
|
32
|
-
def list(custom_headers
|
33
|
-
first_page = list_as_lazy(custom_headers)
|
32
|
+
def list(custom_headers:nil)
|
33
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
34
34
|
first_page.get_all_items
|
35
35
|
end
|
36
36
|
|
@@ -42,8 +42,8 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
42
42
|
#
|
43
43
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
44
|
#
|
45
|
-
def list_with_http_info(custom_headers
|
46
|
-
list_async(custom_headers).value!
|
45
|
+
def list_with_http_info(custom_headers:nil)
|
46
|
+
list_async(custom_headers:custom_headers).value!
|
47
47
|
end
|
48
48
|
|
49
49
|
#
|
@@ -54,11 +54,12 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
54
54
|
#
|
55
55
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
56
|
#
|
57
|
-
def list_async(custom_headers
|
57
|
+
def list_async(custom_headers:nil)
|
58
58
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
59
59
|
|
60
60
|
|
61
61
|
request_headers = {}
|
62
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
62
63
|
|
63
64
|
# Set Headers
|
64
65
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -112,8 +113,8 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
112
113
|
#
|
113
114
|
# @return [OperationListResult] operation results.
|
114
115
|
#
|
115
|
-
def list_next(next_page_link, custom_headers
|
116
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
116
|
+
def list_next(next_page_link, custom_headers:nil)
|
117
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
117
118
|
response.body unless response.nil?
|
118
119
|
end
|
119
120
|
|
@@ -127,8 +128,8 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
127
128
|
#
|
128
129
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
129
130
|
#
|
130
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
131
|
-
list_next_async(next_page_link, custom_headers).value!
|
131
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
132
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
132
133
|
end
|
133
134
|
|
134
135
|
#
|
@@ -141,11 +142,12 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
141
142
|
#
|
142
143
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
143
144
|
#
|
144
|
-
def list_next_async(next_page_link, custom_headers
|
145
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
145
146
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
146
147
|
|
147
148
|
|
148
149
|
request_headers = {}
|
150
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
149
151
|
|
150
152
|
# Set Headers
|
151
153
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -198,12 +200,12 @@ module Azure::EventHub::Mgmt::V2015_08_01
|
|
198
200
|
# @return [OperationListResult] which provide lazy access to pages of the
|
199
201
|
# response.
|
200
202
|
#
|
201
|
-
def list_as_lazy(custom_headers
|
202
|
-
response = list_async(custom_headers).value!
|
203
|
+
def list_as_lazy(custom_headers:nil)
|
204
|
+
response = list_async(custom_headers:custom_headers).value!
|
203
205
|
unless response.nil?
|
204
206
|
page = response.body
|
205
207
|
page.next_method = Proc.new do |next_page_link|
|
206
|
-
list_next_async(next_page_link, custom_headers)
|
208
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
207
209
|
end
|
208
210
|
page
|
209
211
|
end
|
@@ -37,8 +37,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
37
37
|
#
|
38
38
|
# @return [ConsumerGroup] operation results.
|
39
39
|
#
|
40
|
-
def create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers
|
41
|
-
response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers).value!
|
40
|
+
def create_or_update(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil)
|
41
|
+
response = create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:custom_headers).value!
|
42
42
|
response.body unless response.nil?
|
43
43
|
end
|
44
44
|
|
@@ -58,8 +58,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
58
58
|
#
|
59
59
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
60
60
|
#
|
61
|
-
def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers
|
62
|
-
create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers).value!
|
61
|
+
def create_or_update_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil)
|
62
|
+
create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:custom_headers).value!
|
63
63
|
end
|
64
64
|
|
65
65
|
#
|
@@ -78,7 +78,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
78
78
|
#
|
79
79
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
80
80
|
#
|
81
|
-
def create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers
|
81
|
+
def create_or_update_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, parameters, custom_headers:nil)
|
82
82
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
83
83
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
84
84
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -96,13 +96,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
96
96
|
|
97
97
|
|
98
98
|
request_headers = {}
|
99
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
99
100
|
|
100
101
|
# Set Headers
|
101
102
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
102
103
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
103
104
|
|
104
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
105
|
-
|
106
105
|
# Serialize Request
|
107
106
|
request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ConsumerGroup.mapper()
|
108
107
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -161,8 +160,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
161
160
|
# will be added to the HTTP request.
|
162
161
|
#
|
163
162
|
#
|
164
|
-
def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers
|
165
|
-
response = delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value!
|
163
|
+
def delete(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil)
|
164
|
+
response = delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value!
|
166
165
|
nil
|
167
166
|
end
|
168
167
|
|
@@ -179,8 +178,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
179
178
|
#
|
180
179
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
181
180
|
#
|
182
|
-
def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers
|
183
|
-
delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value!
|
181
|
+
def delete_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil)
|
182
|
+
delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value!
|
184
183
|
end
|
185
184
|
|
186
185
|
#
|
@@ -196,7 +195,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
196
195
|
#
|
197
196
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
198
197
|
#
|
199
|
-
def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers
|
198
|
+
def delete_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil)
|
200
199
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
201
200
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
202
201
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -213,6 +212,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
213
212
|
|
214
213
|
|
215
214
|
request_headers = {}
|
215
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
216
216
|
|
217
217
|
# Set Headers
|
218
218
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -260,8 +260,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
260
260
|
#
|
261
261
|
# @return [ConsumerGroup] operation results.
|
262
262
|
#
|
263
|
-
def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers
|
264
|
-
response = get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value!
|
263
|
+
def get(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil)
|
264
|
+
response = get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value!
|
265
265
|
response.body unless response.nil?
|
266
266
|
end
|
267
267
|
|
@@ -278,8 +278,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
278
278
|
#
|
279
279
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
280
280
|
#
|
281
|
-
def get_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers
|
282
|
-
get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers).value!
|
281
|
+
def get_with_http_info(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil)
|
282
|
+
get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:custom_headers).value!
|
283
283
|
end
|
284
284
|
|
285
285
|
#
|
@@ -295,7 +295,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
295
295
|
#
|
296
296
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
297
297
|
#
|
298
|
-
def get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers
|
298
|
+
def get_async(resource_group_name, namespace_name, event_hub_name, consumer_group_name, custom_headers:nil)
|
299
299
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
300
300
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
301
301
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -312,6 +312,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
312
312
|
|
313
313
|
|
314
314
|
request_headers = {}
|
315
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
315
316
|
|
316
317
|
# Set Headers
|
317
318
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -369,8 +370,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
369
370
|
#
|
370
371
|
# @return [Array<ConsumerGroup>] operation results.
|
371
372
|
#
|
372
|
-
def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, custom_headers
|
373
|
-
first_page = list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers)
|
373
|
+
def list_by_event_hub(resource_group_name, namespace_name, event_hub_name, custom_headers:nil)
|
374
|
+
first_page = list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers)
|
374
375
|
first_page.get_all_items
|
375
376
|
end
|
376
377
|
|
@@ -387,8 +388,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
387
388
|
#
|
388
389
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
389
390
|
#
|
390
|
-
def list_by_event_hub_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers
|
391
|
-
list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value!
|
391
|
+
def list_by_event_hub_with_http_info(resource_group_name, namespace_name, event_hub_name, custom_headers:nil)
|
392
|
+
list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value!
|
392
393
|
end
|
393
394
|
|
394
395
|
#
|
@@ -404,7 +405,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
404
405
|
#
|
405
406
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
406
407
|
#
|
407
|
-
def list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers
|
408
|
+
def list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers:nil)
|
408
409
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
409
410
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
410
411
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -418,6 +419,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
418
419
|
|
419
420
|
|
420
421
|
request_headers = {}
|
422
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
421
423
|
|
422
424
|
# Set Headers
|
423
425
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -473,8 +475,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
473
475
|
#
|
474
476
|
# @return [ConsumerGroupListResult] operation results.
|
475
477
|
#
|
476
|
-
def list_by_event_hub_next(next_page_link, custom_headers
|
477
|
-
response = list_by_event_hub_next_async(next_page_link, custom_headers).value!
|
478
|
+
def list_by_event_hub_next(next_page_link, custom_headers:nil)
|
479
|
+
response = list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers).value!
|
478
480
|
response.body unless response.nil?
|
479
481
|
end
|
480
482
|
|
@@ -489,8 +491,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
489
491
|
#
|
490
492
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
491
493
|
#
|
492
|
-
def list_by_event_hub_next_with_http_info(next_page_link, custom_headers
|
493
|
-
list_by_event_hub_next_async(next_page_link, custom_headers).value!
|
494
|
+
def list_by_event_hub_next_with_http_info(next_page_link, custom_headers:nil)
|
495
|
+
list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers).value!
|
494
496
|
end
|
495
497
|
|
496
498
|
#
|
@@ -504,11 +506,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
504
506
|
#
|
505
507
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
506
508
|
#
|
507
|
-
def list_by_event_hub_next_async(next_page_link, custom_headers
|
509
|
+
def list_by_event_hub_next_async(next_page_link, custom_headers:nil)
|
508
510
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
509
511
|
|
510
512
|
|
511
513
|
request_headers = {}
|
514
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
512
515
|
|
513
516
|
# Set Headers
|
514
517
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -566,12 +569,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
566
569
|
# @return [ConsumerGroupListResult] which provide lazy access to pages of the
|
567
570
|
# response.
|
568
571
|
#
|
569
|
-
def list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers
|
570
|
-
response = list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers).value!
|
572
|
+
def list_by_event_hub_as_lazy(resource_group_name, namespace_name, event_hub_name, custom_headers:nil)
|
573
|
+
response = list_by_event_hub_async(resource_group_name, namespace_name, event_hub_name, custom_headers:custom_headers).value!
|
571
574
|
unless response.nil?
|
572
575
|
page = response.body
|
573
576
|
page.next_method = Proc.new do |next_page_link|
|
574
|
-
list_by_event_hub_next_async(next_page_link, custom_headers)
|
577
|
+
list_by_event_hub_next_async(next_page_link, custom_headers:custom_headers)
|
575
578
|
end
|
576
579
|
page
|
577
580
|
end
|
@@ -21,6 +21,119 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
21
21
|
# @return [EventHubManagementClient] reference to the EventHubManagementClient
|
22
22
|
attr_reader :client
|
23
23
|
|
24
|
+
#
|
25
|
+
# Check the give Namespace name availability.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] Name of the resource group within the
|
28
|
+
# azure subscription.
|
29
|
+
# @param namespace_name [String] The Namespace name
|
30
|
+
# @param parameters [CheckNameAvailabilityParameter] Parameters to check
|
31
|
+
# availability of the given Alias name
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [CheckNameAvailabilityResult] operation results.
|
36
|
+
#
|
37
|
+
def check_name_availability(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
38
|
+
response = check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Check the give Namespace name availability.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] Name of the resource group within the
|
46
|
+
# azure subscription.
|
47
|
+
# @param namespace_name [String] The Namespace name
|
48
|
+
# @param parameters [CheckNameAvailabilityParameter] Parameters to check
|
49
|
+
# availability of the given Alias name
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def check_name_availability_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
56
|
+
check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Check the give Namespace name availability.
|
61
|
+
#
|
62
|
+
# @param resource_group_name [String] Name of the resource group within the
|
63
|
+
# azure subscription.
|
64
|
+
# @param namespace_name [String] The Namespace name
|
65
|
+
# @param parameters [CheckNameAvailabilityParameter] Parameters to check
|
66
|
+
# availability of the given Alias name
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def check_name_availability_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
73
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
75
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
76
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
77
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
78
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
79
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
80
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
81
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
82
|
+
|
83
|
+
|
84
|
+
request_headers = {}
|
85
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
86
|
+
|
87
|
+
# Set Headers
|
88
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
89
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
90
|
+
|
91
|
+
# Serialize Request
|
92
|
+
request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityParameter.mapper()
|
93
|
+
request_content = @client.serialize(request_mapper, parameters)
|
94
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
95
|
+
|
96
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability'
|
97
|
+
|
98
|
+
request_url = @base_url || @client.base_url
|
99
|
+
|
100
|
+
options = {
|
101
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
102
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name},
|
103
|
+
query_params: {'api-version' => @client.api_version},
|
104
|
+
body: request_content,
|
105
|
+
headers: request_headers.merge(custom_headers || {}),
|
106
|
+
base_url: request_url
|
107
|
+
}
|
108
|
+
promise = @client.make_request_async(:post, path_template, options)
|
109
|
+
|
110
|
+
promise = promise.then do |result|
|
111
|
+
http_response = result.response
|
112
|
+
status_code = http_response.status
|
113
|
+
response_content = http_response.body
|
114
|
+
unless status_code == 200
|
115
|
+
error_model = JSON.load(response_content)
|
116
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
117
|
+
end
|
118
|
+
|
119
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
120
|
+
# Deserialize Response
|
121
|
+
if status_code == 200
|
122
|
+
begin
|
123
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
124
|
+
result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult.mapper()
|
125
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
126
|
+
rescue Exception => e
|
127
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
result
|
132
|
+
end
|
133
|
+
|
134
|
+
promise.execute
|
135
|
+
end
|
136
|
+
|
24
137
|
#
|
25
138
|
# Gets all Alias(Disaster Recovery configurations)
|
26
139
|
#
|
@@ -32,8 +145,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
32
145
|
#
|
33
146
|
# @return [Array<ArmDisasterRecovery>] operation results.
|
34
147
|
#
|
35
|
-
def list(resource_group_name, namespace_name, custom_headers
|
36
|
-
first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers)
|
148
|
+
def list(resource_group_name, namespace_name, custom_headers:nil)
|
149
|
+
first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers:custom_headers)
|
37
150
|
first_page.get_all_items
|
38
151
|
end
|
39
152
|
|
@@ -48,8 +161,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
48
161
|
#
|
49
162
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
163
|
#
|
51
|
-
def list_with_http_info(resource_group_name, namespace_name, custom_headers
|
52
|
-
list_async(resource_group_name, namespace_name, custom_headers).value!
|
164
|
+
def list_with_http_info(resource_group_name, namespace_name, custom_headers:nil)
|
165
|
+
list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
|
53
166
|
end
|
54
167
|
|
55
168
|
#
|
@@ -63,7 +176,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
63
176
|
#
|
64
177
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
178
|
#
|
66
|
-
def list_async(resource_group_name, namespace_name, custom_headers
|
179
|
+
def list_async(resource_group_name, namespace_name, custom_headers:nil)
|
67
180
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
68
181
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
69
182
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -75,6 +188,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
75
188
|
|
76
189
|
|
77
190
|
request_headers = {}
|
191
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
78
192
|
|
79
193
|
# Set Headers
|
80
194
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -133,8 +247,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
133
247
|
#
|
134
248
|
# @return [ArmDisasterRecovery] operation results.
|
135
249
|
#
|
136
|
-
def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers
|
137
|
-
response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value!
|
250
|
+
def create_or_update(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
|
251
|
+
response = create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value!
|
138
252
|
response.body unless response.nil?
|
139
253
|
end
|
140
254
|
|
@@ -152,8 +266,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
152
266
|
#
|
153
267
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
154
268
|
#
|
155
|
-
def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers
|
156
|
-
create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers).value!
|
269
|
+
def create_or_update_with_http_info(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
|
270
|
+
create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:custom_headers).value!
|
157
271
|
end
|
158
272
|
|
159
273
|
#
|
@@ -170,7 +284,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
170
284
|
#
|
171
285
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
172
286
|
#
|
173
|
-
def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers
|
287
|
+
def create_or_update_async(resource_group_name, namespace_name, alias_parameter, parameters, custom_headers:nil)
|
174
288
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
175
289
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
176
290
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -186,13 +300,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
186
300
|
|
187
301
|
|
188
302
|
request_headers = {}
|
303
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
189
304
|
|
190
305
|
# Set Headers
|
191
306
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
192
307
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
193
308
|
|
194
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
195
|
-
|
196
309
|
# Serialize Request
|
197
310
|
request_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
|
198
311
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -250,8 +363,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
250
363
|
# will be added to the HTTP request.
|
251
364
|
#
|
252
365
|
#
|
253
|
-
def delete(resource_group_name, namespace_name, alias_parameter, custom_headers
|
254
|
-
response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
366
|
+
def delete(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
367
|
+
response = delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
255
368
|
nil
|
256
369
|
end
|
257
370
|
|
@@ -267,8 +380,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
267
380
|
#
|
268
381
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
269
382
|
#
|
270
|
-
def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers
|
271
|
-
delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
383
|
+
def delete_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
384
|
+
delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
272
385
|
end
|
273
386
|
|
274
387
|
#
|
@@ -283,7 +396,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
283
396
|
#
|
284
397
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
285
398
|
#
|
286
|
-
def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers
|
399
|
+
def delete_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
287
400
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
288
401
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
289
402
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -298,6 +411,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
298
411
|
|
299
412
|
|
300
413
|
request_headers = {}
|
414
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
301
415
|
|
302
416
|
# Set Headers
|
303
417
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -345,8 +459,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
345
459
|
#
|
346
460
|
# @return [ArmDisasterRecovery] operation results.
|
347
461
|
#
|
348
|
-
def get(resource_group_name, namespace_name, alias_parameter, custom_headers
|
349
|
-
response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
462
|
+
def get(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
463
|
+
response = get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
350
464
|
response.body unless response.nil?
|
351
465
|
end
|
352
466
|
|
@@ -363,8 +477,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
363
477
|
#
|
364
478
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
365
479
|
#
|
366
|
-
def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers
|
367
|
-
get_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
480
|
+
def get_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
481
|
+
get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
368
482
|
end
|
369
483
|
|
370
484
|
#
|
@@ -380,7 +494,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
380
494
|
#
|
381
495
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
382
496
|
#
|
383
|
-
def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers
|
497
|
+
def get_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
384
498
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
385
499
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
386
500
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -395,6 +509,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
395
509
|
|
396
510
|
|
397
511
|
request_headers = {}
|
512
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
398
513
|
|
399
514
|
# Set Headers
|
400
515
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -451,8 +566,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
451
566
|
# will be added to the HTTP request.
|
452
567
|
#
|
453
568
|
#
|
454
|
-
def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers
|
455
|
-
response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
569
|
+
def break_pairing(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
570
|
+
response = break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
456
571
|
nil
|
457
572
|
end
|
458
573
|
|
@@ -469,8 +584,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
469
584
|
#
|
470
585
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
471
586
|
#
|
472
|
-
def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers
|
473
|
-
break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
587
|
+
def break_pairing_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
588
|
+
break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
474
589
|
end
|
475
590
|
|
476
591
|
#
|
@@ -486,7 +601,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
486
601
|
#
|
487
602
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
488
603
|
#
|
489
|
-
def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers
|
604
|
+
def break_pairing_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
490
605
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
491
606
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
492
607
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -501,6 +616,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
501
616
|
|
502
617
|
|
503
618
|
request_headers = {}
|
619
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
504
620
|
|
505
621
|
# Set Headers
|
506
622
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -547,8 +663,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
547
663
|
# will be added to the HTTP request.
|
548
664
|
#
|
549
665
|
#
|
550
|
-
def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers
|
551
|
-
response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
666
|
+
def fail_over(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
667
|
+
response = fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
552
668
|
nil
|
553
669
|
end
|
554
670
|
|
@@ -565,8 +681,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
565
681
|
#
|
566
682
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
567
683
|
#
|
568
|
-
def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers
|
569
|
-
fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers).value!
|
684
|
+
def fail_over_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
685
|
+
fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
570
686
|
end
|
571
687
|
|
572
688
|
#
|
@@ -582,7 +698,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
582
698
|
#
|
583
699
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
584
700
|
#
|
585
|
-
def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers
|
701
|
+
def fail_over_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
586
702
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
587
703
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
588
704
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -597,6 +713,7 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
597
713
|
|
598
714
|
|
599
715
|
request_headers = {}
|
716
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
600
717
|
|
601
718
|
# Set Headers
|
602
719
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -631,6 +748,331 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
631
748
|
promise.execute
|
632
749
|
end
|
633
750
|
|
751
|
+
#
|
752
|
+
# Gets a list of authorization rules for a Namespace.
|
753
|
+
#
|
754
|
+
# @param resource_group_name [String] Name of the resource group within the
|
755
|
+
# azure subscription.
|
756
|
+
# @param namespace_name [String] The Namespace name
|
757
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
758
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
759
|
+
# will be added to the HTTP request.
|
760
|
+
#
|
761
|
+
# @return [Array<AuthorizationRule>] operation results.
|
762
|
+
#
|
763
|
+
def list_authorization_rules(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
764
|
+
first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers)
|
765
|
+
first_page.get_all_items
|
766
|
+
end
|
767
|
+
|
768
|
+
#
|
769
|
+
# Gets a list of authorization rules for a Namespace.
|
770
|
+
#
|
771
|
+
# @param resource_group_name [String] Name of the resource group within the
|
772
|
+
# azure subscription.
|
773
|
+
# @param namespace_name [String] The Namespace name
|
774
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
775
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
776
|
+
# will be added to the HTTP request.
|
777
|
+
#
|
778
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
779
|
+
#
|
780
|
+
def list_authorization_rules_with_http_info(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
781
|
+
list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
782
|
+
end
|
783
|
+
|
784
|
+
#
|
785
|
+
# Gets a list of authorization rules for a Namespace.
|
786
|
+
#
|
787
|
+
# @param resource_group_name [String] Name of the resource group within the
|
788
|
+
# azure subscription.
|
789
|
+
# @param namespace_name [String] The Namespace name
|
790
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
791
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
792
|
+
# to the HTTP request.
|
793
|
+
#
|
794
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
795
|
+
#
|
796
|
+
def list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
797
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
798
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
799
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
800
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
801
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
802
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
803
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
804
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
|
805
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
|
806
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
807
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
808
|
+
|
809
|
+
|
810
|
+
request_headers = {}
|
811
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
812
|
+
|
813
|
+
# Set Headers
|
814
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
815
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
816
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules'
|
817
|
+
|
818
|
+
request_url = @base_url || @client.base_url
|
819
|
+
|
820
|
+
options = {
|
821
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
822
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'subscriptionId' => @client.subscription_id},
|
823
|
+
query_params: {'api-version' => @client.api_version},
|
824
|
+
headers: request_headers.merge(custom_headers || {}),
|
825
|
+
base_url: request_url
|
826
|
+
}
|
827
|
+
promise = @client.make_request_async(:get, path_template, options)
|
828
|
+
|
829
|
+
promise = promise.then do |result|
|
830
|
+
http_response = result.response
|
831
|
+
status_code = http_response.status
|
832
|
+
response_content = http_response.body
|
833
|
+
unless status_code == 200
|
834
|
+
error_model = JSON.load(response_content)
|
835
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
836
|
+
end
|
837
|
+
|
838
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
839
|
+
# Deserialize Response
|
840
|
+
if status_code == 200
|
841
|
+
begin
|
842
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
843
|
+
result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
|
844
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
845
|
+
rescue Exception => e
|
846
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
847
|
+
end
|
848
|
+
end
|
849
|
+
|
850
|
+
result
|
851
|
+
end
|
852
|
+
|
853
|
+
promise.execute
|
854
|
+
end
|
855
|
+
|
856
|
+
#
|
857
|
+
# Gets an AuthorizationRule for a Namespace by rule name.
|
858
|
+
#
|
859
|
+
# @param resource_group_name [String] Name of the resource group within the
|
860
|
+
# azure subscription.
|
861
|
+
# @param namespace_name [String] The Namespace name
|
862
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
863
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
864
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
865
|
+
# will be added to the HTTP request.
|
866
|
+
#
|
867
|
+
# @return [AuthorizationRule] operation results.
|
868
|
+
#
|
869
|
+
def get_authorization_rule(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
870
|
+
response = get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
|
871
|
+
response.body unless response.nil?
|
872
|
+
end
|
873
|
+
|
874
|
+
#
|
875
|
+
# Gets an AuthorizationRule for a Namespace by rule name.
|
876
|
+
#
|
877
|
+
# @param resource_group_name [String] Name of the resource group within the
|
878
|
+
# azure subscription.
|
879
|
+
# @param namespace_name [String] The Namespace name
|
880
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
881
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
882
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
883
|
+
# will be added to the HTTP request.
|
884
|
+
#
|
885
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
886
|
+
#
|
887
|
+
def get_authorization_rule_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
888
|
+
get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
|
889
|
+
end
|
890
|
+
|
891
|
+
#
|
892
|
+
# Gets an AuthorizationRule for a Namespace by rule name.
|
893
|
+
#
|
894
|
+
# @param resource_group_name [String] Name of the resource group within the
|
895
|
+
# azure subscription.
|
896
|
+
# @param namespace_name [String] The Namespace name
|
897
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
898
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
899
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
900
|
+
# to the HTTP request.
|
901
|
+
#
|
902
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
903
|
+
#
|
904
|
+
def get_authorization_rule_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
905
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
906
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
907
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
908
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
909
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
910
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
911
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
912
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
|
913
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
|
914
|
+
fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
|
915
|
+
fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
|
916
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
917
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
918
|
+
|
919
|
+
|
920
|
+
request_headers = {}
|
921
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
922
|
+
|
923
|
+
# Set Headers
|
924
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
925
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
926
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}'
|
927
|
+
|
928
|
+
request_url = @base_url || @client.base_url
|
929
|
+
|
930
|
+
options = {
|
931
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
932
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
|
933
|
+
query_params: {'api-version' => @client.api_version},
|
934
|
+
headers: request_headers.merge(custom_headers || {}),
|
935
|
+
base_url: request_url
|
936
|
+
}
|
937
|
+
promise = @client.make_request_async(:get, path_template, options)
|
938
|
+
|
939
|
+
promise = promise.then do |result|
|
940
|
+
http_response = result.response
|
941
|
+
status_code = http_response.status
|
942
|
+
response_content = http_response.body
|
943
|
+
unless status_code == 200
|
944
|
+
error_model = JSON.load(response_content)
|
945
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
946
|
+
end
|
947
|
+
|
948
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
949
|
+
# Deserialize Response
|
950
|
+
if status_code == 200
|
951
|
+
begin
|
952
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
953
|
+
result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRule.mapper()
|
954
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
955
|
+
rescue Exception => e
|
956
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
957
|
+
end
|
958
|
+
end
|
959
|
+
|
960
|
+
result
|
961
|
+
end
|
962
|
+
|
963
|
+
promise.execute
|
964
|
+
end
|
965
|
+
|
966
|
+
#
|
967
|
+
# Gets the primary and secondary connection strings for the Namespace.
|
968
|
+
#
|
969
|
+
# @param resource_group_name [String] Name of the resource group within the
|
970
|
+
# azure subscription.
|
971
|
+
# @param namespace_name [String] The Namespace name
|
972
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
973
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
974
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
975
|
+
# will be added to the HTTP request.
|
976
|
+
#
|
977
|
+
# @return [AccessKeys] operation results.
|
978
|
+
#
|
979
|
+
def list_keys(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
980
|
+
response = list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
|
981
|
+
response.body unless response.nil?
|
982
|
+
end
|
983
|
+
|
984
|
+
#
|
985
|
+
# Gets the primary and secondary connection strings for the Namespace.
|
986
|
+
#
|
987
|
+
# @param resource_group_name [String] Name of the resource group within the
|
988
|
+
# azure subscription.
|
989
|
+
# @param namespace_name [String] The Namespace name
|
990
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
991
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
992
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
993
|
+
# will be added to the HTTP request.
|
994
|
+
#
|
995
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
996
|
+
#
|
997
|
+
def list_keys_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
998
|
+
list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
|
999
|
+
end
|
1000
|
+
|
1001
|
+
#
|
1002
|
+
# Gets the primary and secondary connection strings for the Namespace.
|
1003
|
+
#
|
1004
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1005
|
+
# azure subscription.
|
1006
|
+
# @param namespace_name [String] The Namespace name
|
1007
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
1008
|
+
# @param authorization_rule_name [String] The authorization rule name.
|
1009
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1010
|
+
# to the HTTP request.
|
1011
|
+
#
|
1012
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1013
|
+
#
|
1014
|
+
def list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
1015
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1016
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1017
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1018
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
1019
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
1020
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
1021
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
1022
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
|
1023
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
|
1024
|
+
fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
|
1025
|
+
fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
|
1026
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1027
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1028
|
+
|
1029
|
+
|
1030
|
+
request_headers = {}
|
1031
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1032
|
+
|
1033
|
+
# Set Headers
|
1034
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1035
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1036
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys'
|
1037
|
+
|
1038
|
+
request_url = @base_url || @client.base_url
|
1039
|
+
|
1040
|
+
options = {
|
1041
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1042
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
|
1043
|
+
query_params: {'api-version' => @client.api_version},
|
1044
|
+
headers: request_headers.merge(custom_headers || {}),
|
1045
|
+
base_url: request_url
|
1046
|
+
}
|
1047
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1048
|
+
|
1049
|
+
promise = promise.then do |result|
|
1050
|
+
http_response = result.response
|
1051
|
+
status_code = http_response.status
|
1052
|
+
response_content = http_response.body
|
1053
|
+
unless status_code == 200
|
1054
|
+
error_model = JSON.load(response_content)
|
1055
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1059
|
+
# Deserialize Response
|
1060
|
+
if status_code == 200
|
1061
|
+
begin
|
1062
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1063
|
+
result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
|
1064
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1065
|
+
rescue Exception => e
|
1066
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1067
|
+
end
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
result
|
1071
|
+
end
|
1072
|
+
|
1073
|
+
promise.execute
|
1074
|
+
end
|
1075
|
+
|
634
1076
|
#
|
635
1077
|
# Gets all Alias(Disaster Recovery configurations)
|
636
1078
|
#
|
@@ -641,8 +1083,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
641
1083
|
#
|
642
1084
|
# @return [ArmDisasterRecoveryListResult] operation results.
|
643
1085
|
#
|
644
|
-
def list_next(next_page_link, custom_headers
|
645
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
1086
|
+
def list_next(next_page_link, custom_headers:nil)
|
1087
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
646
1088
|
response.body unless response.nil?
|
647
1089
|
end
|
648
1090
|
|
@@ -656,8 +1098,8 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
656
1098
|
#
|
657
1099
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
658
1100
|
#
|
659
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
660
|
-
list_next_async(next_page_link, custom_headers).value!
|
1101
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
1102
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
661
1103
|
end
|
662
1104
|
|
663
1105
|
#
|
@@ -670,11 +1112,12 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
670
1112
|
#
|
671
1113
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
672
1114
|
#
|
673
|
-
def list_next_async(next_page_link, custom_headers
|
1115
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
674
1116
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
675
1117
|
|
676
1118
|
|
677
1119
|
request_headers = {}
|
1120
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
678
1121
|
|
679
1122
|
# Set Headers
|
680
1123
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -718,6 +1161,94 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
718
1161
|
promise.execute
|
719
1162
|
end
|
720
1163
|
|
1164
|
+
#
|
1165
|
+
# Gets a list of authorization rules for a Namespace.
|
1166
|
+
#
|
1167
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1168
|
+
# to List operation.
|
1169
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1170
|
+
# will be added to the HTTP request.
|
1171
|
+
#
|
1172
|
+
# @return [AuthorizationRuleListResult] operation results.
|
1173
|
+
#
|
1174
|
+
def list_authorization_rules_next(next_page_link, custom_headers:nil)
|
1175
|
+
response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
|
1176
|
+
response.body unless response.nil?
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
#
|
1180
|
+
# Gets a list of authorization rules for a Namespace.
|
1181
|
+
#
|
1182
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1183
|
+
# to List operation.
|
1184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1185
|
+
# will be added to the HTTP request.
|
1186
|
+
#
|
1187
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1188
|
+
#
|
1189
|
+
def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
|
1190
|
+
list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
#
|
1194
|
+
# Gets a list of authorization rules for a Namespace.
|
1195
|
+
#
|
1196
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1197
|
+
# to List operation.
|
1198
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1199
|
+
# to the HTTP request.
|
1200
|
+
#
|
1201
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1202
|
+
#
|
1203
|
+
def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
|
1204
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1205
|
+
|
1206
|
+
|
1207
|
+
request_headers = {}
|
1208
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1209
|
+
|
1210
|
+
# Set Headers
|
1211
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1212
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1213
|
+
path_template = '{nextLink}'
|
1214
|
+
|
1215
|
+
request_url = @base_url || @client.base_url
|
1216
|
+
|
1217
|
+
options = {
|
1218
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1219
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1220
|
+
headers: request_headers.merge(custom_headers || {}),
|
1221
|
+
base_url: request_url
|
1222
|
+
}
|
1223
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1224
|
+
|
1225
|
+
promise = promise.then do |result|
|
1226
|
+
http_response = result.response
|
1227
|
+
status_code = http_response.status
|
1228
|
+
response_content = http_response.body
|
1229
|
+
unless status_code == 200
|
1230
|
+
error_model = JSON.load(response_content)
|
1231
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1232
|
+
end
|
1233
|
+
|
1234
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1235
|
+
# Deserialize Response
|
1236
|
+
if status_code == 200
|
1237
|
+
begin
|
1238
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1239
|
+
result_mapper = Azure::EventHub::Mgmt::V2017_04_01::Models::AuthorizationRuleListResult.mapper()
|
1240
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1241
|
+
rescue Exception => e
|
1242
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1243
|
+
end
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
result
|
1247
|
+
end
|
1248
|
+
|
1249
|
+
promise.execute
|
1250
|
+
end
|
1251
|
+
|
721
1252
|
#
|
722
1253
|
# Gets all Alias(Disaster Recovery configurations)
|
723
1254
|
#
|
@@ -730,12 +1261,36 @@ module Azure::EventHub::Mgmt::V2017_04_01
|
|
730
1261
|
# @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of
|
731
1262
|
# the response.
|
732
1263
|
#
|
733
|
-
def list_as_lazy(resource_group_name, namespace_name, custom_headers
|
734
|
-
response = list_async(resource_group_name, namespace_name, custom_headers).value!
|
1264
|
+
def list_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
|
1265
|
+
response = list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
|
1266
|
+
unless response.nil?
|
1267
|
+
page = response.body
|
1268
|
+
page.next_method = Proc.new do |next_page_link|
|
1269
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
1270
|
+
end
|
1271
|
+
page
|
1272
|
+
end
|
1273
|
+
end
|
1274
|
+
|
1275
|
+
#
|
1276
|
+
# Gets a list of authorization rules for a Namespace.
|
1277
|
+
#
|
1278
|
+
# @param resource_group_name [String] Name of the resource group within the
|
1279
|
+
# azure subscription.
|
1280
|
+
# @param namespace_name [String] The Namespace name
|
1281
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
1282
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1283
|
+
# will be added to the HTTP request.
|
1284
|
+
#
|
1285
|
+
# @return [AuthorizationRuleListResult] which provide lazy access to pages of
|
1286
|
+
# the response.
|
1287
|
+
#
|
1288
|
+
def list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
1289
|
+
response = list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
735
1290
|
unless response.nil?
|
736
1291
|
page = response.body
|
737
1292
|
page.next_method = Proc.new do |next_page_link|
|
738
|
-
|
1293
|
+
list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
|
739
1294
|
end
|
740
1295
|
page
|
741
1296
|
end
|