azure_mgmt_service_bus 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_create_or_update_parameters.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_resource.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb +113 -107
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/operations.rb +15 -13
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb +78 -72
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +4 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/subscriptions.rb +33 -30
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/topics.rb +78 -72
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb +597 -40
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/event_hubs.rb +15 -13
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/arm_disaster_recovery.rb +13 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbqueue.rb +22 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbsubscription.rb +34 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/namespaces.rb +113 -107
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/operations.rb +15 -13
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/premium_messaging_regions_operations.rb +15 -13
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/queues.rb +78 -72
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/regions.rb +15 -13
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/rules.rb +33 -30
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +4 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/subscriptions.rb +33 -30
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/topics.rb +78 -72
- data/lib/profiles/latest/modules/servicebus_profile_module.rb +187 -168
- data/lib/profiles/latest/servicebus_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/servicebus_module_definition.rb +0 -1
- data/lib/version.rb +1 -1
- metadata +3 -3
@@ -21,6 +21,119 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
21
21
|
# @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient
|
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 [CheckNameAvailability] Parameters to check availability of
|
31
|
+
# the given namespace 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_method(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
38
|
+
response = check_name_availability_method_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 [CheckNameAvailability] Parameters to check availability of
|
49
|
+
# the given namespace 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_method_with_http_info(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
56
|
+
check_name_availability_method_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 [CheckNameAvailability] Parameters to check availability of
|
66
|
+
# the given namespace 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_method_async(resource_group_name, namespace_name, parameters, custom_headers:nil)
|
73
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
74
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
75
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
76
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
77
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
78
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
79
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
80
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
81
|
+
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::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailability.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.ServiceBus/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: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'subscriptionId' => @client.subscription_id},
|
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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecovery.mapper()
|
198
311
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -250,8 +363,8 @@ module Azure::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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::ServiceBus::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,333 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
631
748
|
promise.execute
|
632
749
|
end
|
633
750
|
|
751
|
+
#
|
752
|
+
# Gets the 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<SBAuthorizationRule>] 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 the 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 the 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.ServiceBus/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::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult.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 authorization rule 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 authorizationrule 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 [SBAuthorizationRule] 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 authorization rule 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 authorizationrule 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 authorization rule 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 authorizationrule 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 - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50
|
916
|
+
fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
|
917
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
918
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
919
|
+
|
920
|
+
|
921
|
+
request_headers = {}
|
922
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
923
|
+
|
924
|
+
# Set Headers
|
925
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
926
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
927
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}'
|
928
|
+
|
929
|
+
request_url = @base_url || @client.base_url
|
930
|
+
|
931
|
+
options = {
|
932
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
933
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
|
934
|
+
query_params: {'api-version' => @client.api_version},
|
935
|
+
headers: request_headers.merge(custom_headers || {}),
|
936
|
+
base_url: request_url
|
937
|
+
}
|
938
|
+
promise = @client.make_request_async(:get, path_template, options)
|
939
|
+
|
940
|
+
promise = promise.then do |result|
|
941
|
+
http_response = result.response
|
942
|
+
status_code = http_response.status
|
943
|
+
response_content = http_response.body
|
944
|
+
unless status_code == 200
|
945
|
+
error_model = JSON.load(response_content)
|
946
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
947
|
+
end
|
948
|
+
|
949
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
950
|
+
# Deserialize Response
|
951
|
+
if status_code == 200
|
952
|
+
begin
|
953
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
954
|
+
result_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRule.mapper()
|
955
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
956
|
+
rescue Exception => e
|
957
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
958
|
+
end
|
959
|
+
end
|
960
|
+
|
961
|
+
result
|
962
|
+
end
|
963
|
+
|
964
|
+
promise.execute
|
965
|
+
end
|
966
|
+
|
967
|
+
#
|
968
|
+
# Gets the primary and secondary connection strings for the namespace.
|
969
|
+
#
|
970
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
971
|
+
# Azure subscription.
|
972
|
+
# @param namespace_name [String] The namespace name
|
973
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
974
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
975
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
976
|
+
# will be added to the HTTP request.
|
977
|
+
#
|
978
|
+
# @return [AccessKeys] operation results.
|
979
|
+
#
|
980
|
+
def list_keys(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
981
|
+
response = list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
|
982
|
+
response.body unless response.nil?
|
983
|
+
end
|
984
|
+
|
985
|
+
#
|
986
|
+
# Gets the primary and secondary connection strings for the namespace.
|
987
|
+
#
|
988
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
989
|
+
# Azure subscription.
|
990
|
+
# @param namespace_name [String] The namespace name
|
991
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
992
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
993
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
994
|
+
# will be added to the HTTP request.
|
995
|
+
#
|
996
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
997
|
+
#
|
998
|
+
def list_keys_with_http_info(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
999
|
+
list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:custom_headers).value!
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
#
|
1003
|
+
# Gets the primary and secondary connection strings for the namespace.
|
1004
|
+
#
|
1005
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1006
|
+
# Azure subscription.
|
1007
|
+
# @param namespace_name [String] The namespace name
|
1008
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
1009
|
+
# @param authorization_rule_name [String] The authorizationrule name.
|
1010
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1011
|
+
# to the HTTP request.
|
1012
|
+
#
|
1013
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1014
|
+
#
|
1015
|
+
def list_keys_async(resource_group_name, namespace_name, alias_parameter, authorization_rule_name, custom_headers:nil)
|
1016
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1017
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1018
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1019
|
+
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
1020
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MaxLength': '50'" if !namespace_name.nil? && namespace_name.length > 50
|
1021
|
+
fail ArgumentError, "'namespace_name' should satisfy the constraint - 'MinLength': '6'" if !namespace_name.nil? && namespace_name.length < 6
|
1022
|
+
fail ArgumentError, 'alias_parameter is nil' if alias_parameter.nil?
|
1023
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MaxLength': '50'" if !alias_parameter.nil? && alias_parameter.length > 50
|
1024
|
+
fail ArgumentError, "'alias_parameter' should satisfy the constraint - 'MinLength': '1'" if !alias_parameter.nil? && alias_parameter.length < 1
|
1025
|
+
fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
|
1026
|
+
fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_rule_name.nil? && authorization_rule_name.length > 50
|
1027
|
+
fail ArgumentError, "'authorization_rule_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_rule_name.nil? && authorization_rule_name.length < 1
|
1028
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1029
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1030
|
+
|
1031
|
+
|
1032
|
+
request_headers = {}
|
1033
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1034
|
+
|
1035
|
+
# Set Headers
|
1036
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1037
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1038
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys'
|
1039
|
+
|
1040
|
+
request_url = @base_url || @client.base_url
|
1041
|
+
|
1042
|
+
options = {
|
1043
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1044
|
+
path_params: {'resourceGroupName' => resource_group_name,'namespaceName' => namespace_name,'alias' => alias_parameter,'authorizationRuleName' => authorization_rule_name,'subscriptionId' => @client.subscription_id},
|
1045
|
+
query_params: {'api-version' => @client.api_version},
|
1046
|
+
headers: request_headers.merge(custom_headers || {}),
|
1047
|
+
base_url: request_url
|
1048
|
+
}
|
1049
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1050
|
+
|
1051
|
+
promise = promise.then do |result|
|
1052
|
+
http_response = result.response
|
1053
|
+
status_code = http_response.status
|
1054
|
+
response_content = http_response.body
|
1055
|
+
unless status_code == 200
|
1056
|
+
error_model = JSON.load(response_content)
|
1057
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1061
|
+
# Deserialize Response
|
1062
|
+
if status_code == 200
|
1063
|
+
begin
|
1064
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1065
|
+
result_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessKeys.mapper()
|
1066
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1067
|
+
rescue Exception => e
|
1068
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1069
|
+
end
|
1070
|
+
end
|
1071
|
+
|
1072
|
+
result
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
promise.execute
|
1076
|
+
end
|
1077
|
+
|
634
1078
|
#
|
635
1079
|
# Gets all Alias(Disaster Recovery configurations)
|
636
1080
|
#
|
@@ -641,8 +1085,8 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
641
1085
|
#
|
642
1086
|
# @return [ArmDisasterRecoveryListResult] operation results.
|
643
1087
|
#
|
644
|
-
def list_next(next_page_link, custom_headers
|
645
|
-
response = list_next_async(next_page_link, custom_headers).value!
|
1088
|
+
def list_next(next_page_link, custom_headers:nil)
|
1089
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
646
1090
|
response.body unless response.nil?
|
647
1091
|
end
|
648
1092
|
|
@@ -656,8 +1100,8 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
656
1100
|
#
|
657
1101
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
658
1102
|
#
|
659
|
-
def list_next_with_http_info(next_page_link, custom_headers
|
660
|
-
list_next_async(next_page_link, custom_headers).value!
|
1103
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
1104
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
661
1105
|
end
|
662
1106
|
|
663
1107
|
#
|
@@ -670,11 +1114,12 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
670
1114
|
#
|
671
1115
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
672
1116
|
#
|
673
|
-
def list_next_async(next_page_link, custom_headers
|
1117
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
674
1118
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
675
1119
|
|
676
1120
|
|
677
1121
|
request_headers = {}
|
1122
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
678
1123
|
|
679
1124
|
# Set Headers
|
680
1125
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -718,6 +1163,94 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
718
1163
|
promise.execute
|
719
1164
|
end
|
720
1165
|
|
1166
|
+
#
|
1167
|
+
# Gets the authorization rules for a namespace.
|
1168
|
+
#
|
1169
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1170
|
+
# to List operation.
|
1171
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1172
|
+
# will be added to the HTTP request.
|
1173
|
+
#
|
1174
|
+
# @return [SBAuthorizationRuleListResult] operation results.
|
1175
|
+
#
|
1176
|
+
def list_authorization_rules_next(next_page_link, custom_headers:nil)
|
1177
|
+
response = list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
|
1178
|
+
response.body unless response.nil?
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
#
|
1182
|
+
# Gets the authorization rules for a namespace.
|
1183
|
+
#
|
1184
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1185
|
+
# to List operation.
|
1186
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1187
|
+
# will be added to the HTTP request.
|
1188
|
+
#
|
1189
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1190
|
+
#
|
1191
|
+
def list_authorization_rules_next_with_http_info(next_page_link, custom_headers:nil)
|
1192
|
+
list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers).value!
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
#
|
1196
|
+
# Gets the authorization rules for a namespace.
|
1197
|
+
#
|
1198
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1199
|
+
# to List operation.
|
1200
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1201
|
+
# to the HTTP request.
|
1202
|
+
#
|
1203
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1204
|
+
#
|
1205
|
+
def list_authorization_rules_next_async(next_page_link, custom_headers:nil)
|
1206
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1207
|
+
|
1208
|
+
|
1209
|
+
request_headers = {}
|
1210
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1211
|
+
|
1212
|
+
# Set Headers
|
1213
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1214
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1215
|
+
path_template = '{nextLink}'
|
1216
|
+
|
1217
|
+
request_url = @base_url || @client.base_url
|
1218
|
+
|
1219
|
+
options = {
|
1220
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1221
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1222
|
+
headers: request_headers.merge(custom_headers || {}),
|
1223
|
+
base_url: request_url
|
1224
|
+
}
|
1225
|
+
promise = @client.make_request_async(:get, path_template, options)
|
1226
|
+
|
1227
|
+
promise = promise.then do |result|
|
1228
|
+
http_response = result.response
|
1229
|
+
status_code = http_response.status
|
1230
|
+
response_content = http_response.body
|
1231
|
+
unless status_code == 200
|
1232
|
+
error_model = JSON.load(response_content)
|
1233
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1237
|
+
# Deserialize Response
|
1238
|
+
if status_code == 200
|
1239
|
+
begin
|
1240
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1241
|
+
result_mapper = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult.mapper()
|
1242
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1243
|
+
rescue Exception => e
|
1244
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1245
|
+
end
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
result
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
promise.execute
|
1252
|
+
end
|
1253
|
+
|
721
1254
|
#
|
722
1255
|
# Gets all Alias(Disaster Recovery configurations)
|
723
1256
|
#
|
@@ -730,12 +1263,36 @@ module Azure::ServiceBus::Mgmt::V2017_04_01
|
|
730
1263
|
# @return [ArmDisasterRecoveryListResult] which provide lazy access to pages of
|
731
1264
|
# the response.
|
732
1265
|
#
|
733
|
-
def list_as_lazy(resource_group_name, namespace_name, custom_headers
|
734
|
-
response = list_async(resource_group_name, namespace_name, custom_headers).value!
|
1266
|
+
def list_as_lazy(resource_group_name, namespace_name, custom_headers:nil)
|
1267
|
+
response = list_async(resource_group_name, namespace_name, custom_headers:custom_headers).value!
|
1268
|
+
unless response.nil?
|
1269
|
+
page = response.body
|
1270
|
+
page.next_method = Proc.new do |next_page_link|
|
1271
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
1272
|
+
end
|
1273
|
+
page
|
1274
|
+
end
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
#
|
1278
|
+
# Gets the authorization rules for a namespace.
|
1279
|
+
#
|
1280
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
1281
|
+
# Azure subscription.
|
1282
|
+
# @param namespace_name [String] The namespace name
|
1283
|
+
# @param alias_parameter [String] The Disaster Recovery configuration name
|
1284
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1285
|
+
# will be added to the HTTP request.
|
1286
|
+
#
|
1287
|
+
# @return [SBAuthorizationRuleListResult] which provide lazy access to pages of
|
1288
|
+
# the response.
|
1289
|
+
#
|
1290
|
+
def list_authorization_rules_as_lazy(resource_group_name, namespace_name, alias_parameter, custom_headers:nil)
|
1291
|
+
response = list_authorization_rules_async(resource_group_name, namespace_name, alias_parameter, custom_headers:custom_headers).value!
|
735
1292
|
unless response.nil?
|
736
1293
|
page = response.body
|
737
1294
|
page.next_method = Proc.new do |next_page_link|
|
738
|
-
|
1295
|
+
list_authorization_rules_next_async(next_page_link, custom_headers:custom_headers)
|
739
1296
|
end
|
740
1297
|
page
|
741
1298
|
end
|