azure_mgmt_service_bus 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_service_bus.rb +35 -20
- data/lib/generated/azure_mgmt_service_bus/models/{resource_list_keys.rb → access_keys.rb} +11 -5
- data/lib/generated/azure_mgmt_service_bus/models/access_rights.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/models/action.rb +69 -0
- data/lib/generated/azure_mgmt_service_bus/models/authorization_rule_properties.rb +53 -0
- data/lib/generated/azure_mgmt_service_bus/models/check_name_availability.rb +48 -0
- data/lib/generated/azure_mgmt_service_bus/models/check_name_availability_result.rb +72 -0
- data/lib/generated/azure_mgmt_service_bus/models/correlation_filter.rb +127 -0
- data/lib/generated/azure_mgmt_service_bus/models/entity_status.rb +5 -5
- data/lib/generated/azure_mgmt_service_bus/models/error_response.rb +56 -0
- data/lib/generated/azure_mgmt_service_bus/models/filter_type.rb +16 -0
- data/lib/generated/azure_mgmt_service_bus/models/{policykey.rb → key_type.rb} +3 -3
- data/lib/generated/azure_mgmt_service_bus/models/message_count_details.rb +9 -8
- data/lib/generated/azure_mgmt_service_bus/models/operation.rb +57 -0
- data/lib/generated/azure_mgmt_service_bus/models/operation_display.rb +69 -0
- data/lib/generated/azure_mgmt_service_bus/models/operation_list_result.rb +99 -0
- data/lib/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +59 -0
- data/lib/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb +86 -0
- data/lib/generated/azure_mgmt_service_bus/models/rule.rb +107 -0
- data/lib/generated/azure_mgmt_service_bus/models/rule_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_service_bus/models/{shared_access_authorization_rule_resource.rb → sbauthorization_rule.rb} +7 -27
- data/lib/generated/azure_mgmt_service_bus/models/{shared_access_authorization_rule_list_result.rb → sbauthorization_rule_list_result.rb} +12 -13
- data/lib/generated/azure_mgmt_service_bus/models/{namespace_resource.rb → sbnamespace.rb} +19 -7
- data/lib/generated/azure_mgmt_service_bus/models/{namespace_list_result.rb → sbnamespace_list_result.rb} +11 -11
- data/lib/generated/azure_mgmt_service_bus/models/{namespace_create_or_update_parameters.rb → sbnamespace_update_parameters.rb} +50 -20
- data/lib/generated/azure_mgmt_service_bus/models/{queue_create_or_update_parameters.rb → sbqueue.rb} +119 -133
- data/lib/generated/azure_mgmt_service_bus/models/{queue_list_result.rb → sbqueue_list_result.rb} +11 -10
- data/lib/generated/azure_mgmt_service_bus/models/{sku.rb → sbsku.rb} +14 -10
- data/lib/generated/azure_mgmt_service_bus/models/{subscription_resource.rb → sbsubscription.rb} +74 -92
- data/lib/generated/azure_mgmt_service_bus/models/{subscription_list_result.rb → sbsubscription_list_result.rb} +11 -10
- data/lib/generated/azure_mgmt_service_bus/models/{topic_create_or_update_parameters.rb → sbtopic.rb} +102 -97
- data/lib/generated/azure_mgmt_service_bus/models/{topic_list_result.rb → sbtopic_list_result.rb} +11 -10
- data/lib/generated/azure_mgmt_service_bus/models/sku_name.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/models/sku_tier.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/models/sql_filter.rb +72 -0
- data/lib/generated/azure_mgmt_service_bus/models/sql_rule_action.rb +58 -0
- data/lib/generated/azure_mgmt_service_bus/models/tracked_resource.rb +86 -0
- data/lib/generated/azure_mgmt_service_bus/models/unavailable_reason.rb +20 -0
- data/lib/generated/azure_mgmt_service_bus/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_service_bus/namespaces.rb +442 -188
- data/lib/generated/azure_mgmt_service_bus/operations.rb +213 -0
- data/lib/generated/azure_mgmt_service_bus/queues.rb +198 -169
- data/lib/generated/azure_mgmt_service_bus/rules.rb +558 -0
- data/lib/generated/azure_mgmt_service_bus/service_bus_management_client.rb +10 -2
- data/lib/generated/azure_mgmt_service_bus/subscriptions.rb +90 -78
- data/lib/generated/azure_mgmt_service_bus/topics.rb +199 -173
- data/lib/generated/azure_mgmt_service_bus/version.rb +2 -2
- metadata +38 -23
- data/lib/generated/azure_mgmt_service_bus/models/queue_resource.rb +0 -308
- data/lib/generated/azure_mgmt_service_bus/models/regenerate_keys_parameters.rb +0 -46
- data/lib/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_create_or_update_parameters.rb +0 -74
- data/lib/generated/azure_mgmt_service_bus/models/subscription_create_or_update_parameters.rb +0 -213
- data/lib/generated/azure_mgmt_service_bus/models/topic_resource.rb +0 -263
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -36,6 +36,9 @@ module Azure::ARM::ServiceBus
|
|
36
36
|
# is generated and included in each request. Default is true.
|
37
37
|
attr_accessor :generate_client_request_id
|
38
38
|
|
39
|
+
# @return [Operations] operations
|
40
|
+
attr_reader :operations
|
41
|
+
|
39
42
|
# @return [Namespaces] namespaces
|
40
43
|
attr_reader :namespaces
|
41
44
|
|
@@ -48,6 +51,9 @@ module Azure::ARM::ServiceBus
|
|
48
51
|
# @return [Subscriptions] subscriptions
|
49
52
|
attr_reader :subscriptions
|
50
53
|
|
54
|
+
# @return [Rules] rules
|
55
|
+
attr_reader :rules
|
56
|
+
|
51
57
|
#
|
52
58
|
# Creates initializes a new instance of the ServiceBusManagementClient class.
|
53
59
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
@@ -61,11 +67,13 @@ module Azure::ARM::ServiceBus
|
|
61
67
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
62
68
|
@credentials = credentials
|
63
69
|
|
70
|
+
@operations = Operations.new(self)
|
64
71
|
@namespaces = Namespaces.new(self)
|
65
72
|
@queues = Queues.new(self)
|
66
73
|
@topics = Topics.new(self)
|
67
74
|
@subscriptions = Subscriptions.new(self)
|
68
|
-
@
|
75
|
+
@rules = Rules.new(self)
|
76
|
+
@api_version = '2017-04-01'
|
69
77
|
@accept_language = 'en-US'
|
70
78
|
@long_running_operation_retry_timeout = 30
|
71
79
|
@generate_client_request_id = true
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -8,7 +8,6 @@ module Azure::ARM::ServiceBus
|
|
8
8
|
# Azure Service Bus client
|
9
9
|
#
|
10
10
|
class Subscriptions
|
11
|
-
include Azure::ARM::ServiceBus::Models
|
12
11
|
include MsRestAzure
|
13
12
|
|
14
13
|
#
|
@@ -23,48 +22,51 @@ module Azure::ARM::ServiceBus
|
|
23
22
|
attr_reader :client
|
24
23
|
|
25
24
|
#
|
26
|
-
#
|
25
|
+
# List all the subscriptions under a specified topic.
|
27
26
|
#
|
28
|
-
# @param resource_group_name [String]
|
29
|
-
#
|
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
30
|
# @param topic_name [String] The topic name.
|
31
31
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
32
|
# will be added to the HTTP request.
|
33
33
|
#
|
34
|
-
# @return [Array<
|
34
|
+
# @return [Array<SBSubscription>] operation results.
|
35
35
|
#
|
36
|
-
def
|
37
|
-
first_page =
|
36
|
+
def list_by_topic(resource_group_name, namespace_name, topic_name, custom_headers = nil)
|
37
|
+
first_page = list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers)
|
38
38
|
first_page.get_all_items
|
39
39
|
end
|
40
40
|
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# List all the subscriptions under a specified topic.
|
43
43
|
#
|
44
|
-
# @param resource_group_name [String]
|
45
|
-
#
|
44
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
45
|
+
# Azure subscription.
|
46
|
+
# @param namespace_name [String] The namespace name
|
46
47
|
# @param topic_name [String] The topic name.
|
47
48
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
48
49
|
# will be added to the HTTP request.
|
49
50
|
#
|
50
51
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
51
52
|
#
|
52
|
-
def
|
53
|
-
|
53
|
+
def list_by_topic_with_http_info(resource_group_name, namespace_name, topic_name, custom_headers = nil)
|
54
|
+
list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
|
54
55
|
end
|
55
56
|
|
56
57
|
#
|
57
|
-
#
|
58
|
+
# List all the subscriptions under a specified topic.
|
58
59
|
#
|
59
|
-
# @param resource_group_name [String]
|
60
|
-
#
|
60
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
61
|
+
# Azure subscription.
|
62
|
+
# @param namespace_name [String] The namespace name
|
61
63
|
# @param topic_name [String] The topic name.
|
62
64
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
63
65
|
# to the HTTP request.
|
64
66
|
#
|
65
67
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
66
68
|
#
|
67
|
-
def
|
69
|
+
def list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers = nil)
|
68
70
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
69
71
|
fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
|
70
72
|
fail ArgumentError, 'topic_name is nil' if topic_name.nil?
|
@@ -77,7 +79,7 @@ module Azure::ARM::ServiceBus
|
|
77
79
|
# Set Headers
|
78
80
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
79
81
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
80
|
-
path_template = '
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions'
|
81
83
|
|
82
84
|
request_url = @base_url || @client.base_url
|
83
85
|
|
@@ -96,7 +98,7 @@ module Azure::ARM::ServiceBus
|
|
96
98
|
response_content = http_response.body
|
97
99
|
unless status_code == 200
|
98
100
|
error_model = JSON.load(response_content)
|
99
|
-
fail
|
101
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
100
102
|
end
|
101
103
|
|
102
104
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -104,8 +106,8 @@ module Azure::ARM::ServiceBus
|
|
104
106
|
if status_code == 200
|
105
107
|
begin
|
106
108
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
107
|
-
result_mapper =
|
108
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
109
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBSubscriptionListResult.mapper()
|
110
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
109
111
|
rescue Exception => e
|
110
112
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
111
113
|
end
|
@@ -120,16 +122,17 @@ module Azure::ARM::ServiceBus
|
|
120
122
|
#
|
121
123
|
# Creates a topic subscription.
|
122
124
|
#
|
123
|
-
# @param resource_group_name [String]
|
124
|
-
#
|
125
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
126
|
+
# Azure subscription.
|
127
|
+
# @param namespace_name [String] The namespace name
|
125
128
|
# @param topic_name [String] The topic name.
|
126
129
|
# @param subscription_name [String] The subscription name.
|
127
|
-
# @param parameters [
|
128
|
-
#
|
130
|
+
# @param parameters [SBSubscription] Parameters supplied to create a
|
131
|
+
# subscription resource.
|
129
132
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
133
|
# will be added to the HTTP request.
|
131
134
|
#
|
132
|
-
# @return [
|
135
|
+
# @return [SBSubscription] operation results.
|
133
136
|
#
|
134
137
|
def create_or_update(resource_group_name, namespace_name, topic_name, subscription_name, parameters, custom_headers = nil)
|
135
138
|
response = create_or_update_async(resource_group_name, namespace_name, topic_name, subscription_name, parameters, custom_headers).value!
|
@@ -139,12 +142,13 @@ module Azure::ARM::ServiceBus
|
|
139
142
|
#
|
140
143
|
# Creates a topic subscription.
|
141
144
|
#
|
142
|
-
# @param resource_group_name [String]
|
143
|
-
#
|
145
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
146
|
+
# Azure subscription.
|
147
|
+
# @param namespace_name [String] The namespace name
|
144
148
|
# @param topic_name [String] The topic name.
|
145
149
|
# @param subscription_name [String] The subscription name.
|
146
|
-
# @param parameters [
|
147
|
-
#
|
150
|
+
# @param parameters [SBSubscription] Parameters supplied to create a
|
151
|
+
# subscription resource.
|
148
152
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
149
153
|
# will be added to the HTTP request.
|
150
154
|
#
|
@@ -157,12 +161,13 @@ module Azure::ARM::ServiceBus
|
|
157
161
|
#
|
158
162
|
# Creates a topic subscription.
|
159
163
|
#
|
160
|
-
# @param resource_group_name [String]
|
161
|
-
#
|
164
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
165
|
+
# Azure subscription.
|
166
|
+
# @param namespace_name [String] The namespace name
|
162
167
|
# @param topic_name [String] The topic name.
|
163
168
|
# @param subscription_name [String] The subscription name.
|
164
|
-
# @param parameters [
|
165
|
-
#
|
169
|
+
# @param parameters [SBSubscription] Parameters supplied to create a
|
170
|
+
# subscription resource.
|
166
171
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
167
172
|
# to the HTTP request.
|
168
173
|
#
|
@@ -187,11 +192,11 @@ module Azure::ARM::ServiceBus
|
|
187
192
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
188
193
|
|
189
194
|
# Serialize Request
|
190
|
-
request_mapper =
|
191
|
-
request_content = @client.serialize(request_mapper, parameters
|
195
|
+
request_mapper = Azure::ARM::ServiceBus::Models::SBSubscription.mapper()
|
196
|
+
request_content = @client.serialize(request_mapper, parameters)
|
192
197
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
193
198
|
|
194
|
-
path_template = '
|
199
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
|
195
200
|
|
196
201
|
request_url = @base_url || @client.base_url
|
197
202
|
|
@@ -211,7 +216,7 @@ module Azure::ARM::ServiceBus
|
|
211
216
|
response_content = http_response.body
|
212
217
|
unless status_code == 200
|
213
218
|
error_model = JSON.load(response_content)
|
214
|
-
fail
|
219
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
215
220
|
end
|
216
221
|
|
217
222
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -219,8 +224,8 @@ module Azure::ARM::ServiceBus
|
|
219
224
|
if status_code == 200
|
220
225
|
begin
|
221
226
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
222
|
-
result_mapper =
|
223
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
227
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBSubscription.mapper()
|
228
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
224
229
|
rescue Exception => e
|
225
230
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
226
231
|
end
|
@@ -235,8 +240,9 @@ module Azure::ARM::ServiceBus
|
|
235
240
|
#
|
236
241
|
# Deletes a subscription from the specified topic.
|
237
242
|
#
|
238
|
-
# @param resource_group_name [String]
|
239
|
-
#
|
243
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
244
|
+
# Azure subscription.
|
245
|
+
# @param namespace_name [String] The namespace name
|
240
246
|
# @param topic_name [String] The topic name.
|
241
247
|
# @param subscription_name [String] The subscription name.
|
242
248
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -251,8 +257,9 @@ module Azure::ARM::ServiceBus
|
|
251
257
|
#
|
252
258
|
# Deletes a subscription from the specified topic.
|
253
259
|
#
|
254
|
-
# @param resource_group_name [String]
|
255
|
-
#
|
260
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
261
|
+
# Azure subscription.
|
262
|
+
# @param namespace_name [String] The namespace name
|
256
263
|
# @param topic_name [String] The topic name.
|
257
264
|
# @param subscription_name [String] The subscription name.
|
258
265
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -267,8 +274,9 @@ module Azure::ARM::ServiceBus
|
|
267
274
|
#
|
268
275
|
# Deletes a subscription from the specified topic.
|
269
276
|
#
|
270
|
-
# @param resource_group_name [String]
|
271
|
-
#
|
277
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
278
|
+
# Azure subscription.
|
279
|
+
# @param namespace_name [String] The namespace name
|
272
280
|
# @param topic_name [String] The topic name.
|
273
281
|
# @param subscription_name [String] The subscription name.
|
274
282
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -290,7 +298,7 @@ module Azure::ARM::ServiceBus
|
|
290
298
|
# Set Headers
|
291
299
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
292
300
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
293
|
-
path_template = '
|
301
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
|
294
302
|
|
295
303
|
request_url = @base_url || @client.base_url
|
296
304
|
|
@@ -309,7 +317,7 @@ module Azure::ARM::ServiceBus
|
|
309
317
|
response_content = http_response.body
|
310
318
|
unless status_code == 204 || status_code == 200
|
311
319
|
error_model = JSON.load(response_content)
|
312
|
-
fail
|
320
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
313
321
|
end
|
314
322
|
|
315
323
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -323,14 +331,15 @@ module Azure::ARM::ServiceBus
|
|
323
331
|
#
|
324
332
|
# Returns a subscription description for the specified topic.
|
325
333
|
#
|
326
|
-
# @param resource_group_name [String]
|
327
|
-
#
|
334
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
335
|
+
# Azure subscription.
|
336
|
+
# @param namespace_name [String] The namespace name
|
328
337
|
# @param topic_name [String] The topic name.
|
329
338
|
# @param subscription_name [String] The subscription name.
|
330
339
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
331
340
|
# will be added to the HTTP request.
|
332
341
|
#
|
333
|
-
# @return [
|
342
|
+
# @return [SBSubscription] operation results.
|
334
343
|
#
|
335
344
|
def get(resource_group_name, namespace_name, topic_name, subscription_name, custom_headers = nil)
|
336
345
|
response = get_async(resource_group_name, namespace_name, topic_name, subscription_name, custom_headers).value!
|
@@ -340,8 +349,9 @@ module Azure::ARM::ServiceBus
|
|
340
349
|
#
|
341
350
|
# Returns a subscription description for the specified topic.
|
342
351
|
#
|
343
|
-
# @param resource_group_name [String]
|
344
|
-
#
|
352
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
353
|
+
# Azure subscription.
|
354
|
+
# @param namespace_name [String] The namespace name
|
345
355
|
# @param topic_name [String] The topic name.
|
346
356
|
# @param subscription_name [String] The subscription name.
|
347
357
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -356,8 +366,9 @@ module Azure::ARM::ServiceBus
|
|
356
366
|
#
|
357
367
|
# Returns a subscription description for the specified topic.
|
358
368
|
#
|
359
|
-
# @param resource_group_name [String]
|
360
|
-
#
|
369
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
370
|
+
# Azure subscription.
|
371
|
+
# @param namespace_name [String] The namespace name
|
361
372
|
# @param topic_name [String] The topic name.
|
362
373
|
# @param subscription_name [String] The subscription name.
|
363
374
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -379,7 +390,7 @@ module Azure::ARM::ServiceBus
|
|
379
390
|
# Set Headers
|
380
391
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
381
392
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
382
|
-
path_template = '
|
393
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}'
|
383
394
|
|
384
395
|
request_url = @base_url || @client.base_url
|
385
396
|
|
@@ -398,7 +409,7 @@ module Azure::ARM::ServiceBus
|
|
398
409
|
response_content = http_response.body
|
399
410
|
unless status_code == 200
|
400
411
|
error_model = JSON.load(response_content)
|
401
|
-
fail
|
412
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
402
413
|
end
|
403
414
|
|
404
415
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -406,8 +417,8 @@ module Azure::ARM::ServiceBus
|
|
406
417
|
if status_code == 200
|
407
418
|
begin
|
408
419
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
409
|
-
result_mapper =
|
410
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
420
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBSubscription.mapper()
|
421
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
411
422
|
rescue Exception => e
|
412
423
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
413
424
|
end
|
@@ -420,22 +431,22 @@ module Azure::ARM::ServiceBus
|
|
420
431
|
end
|
421
432
|
|
422
433
|
#
|
423
|
-
#
|
434
|
+
# List all the subscriptions under a specified topic.
|
424
435
|
#
|
425
436
|
# @param next_page_link [String] The NextLink from the previous successful call
|
426
437
|
# to List operation.
|
427
438
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
428
439
|
# will be added to the HTTP request.
|
429
440
|
#
|
430
|
-
# @return [
|
441
|
+
# @return [SBSubscriptionListResult] operation results.
|
431
442
|
#
|
432
|
-
def
|
433
|
-
response =
|
443
|
+
def list_by_topic_next(next_page_link, custom_headers = nil)
|
444
|
+
response = list_by_topic_next_async(next_page_link, custom_headers).value!
|
434
445
|
response.body unless response.nil?
|
435
446
|
end
|
436
447
|
|
437
448
|
#
|
438
|
-
#
|
449
|
+
# List all the subscriptions under a specified topic.
|
439
450
|
#
|
440
451
|
# @param next_page_link [String] The NextLink from the previous successful call
|
441
452
|
# to List operation.
|
@@ -444,12 +455,12 @@ module Azure::ARM::ServiceBus
|
|
444
455
|
#
|
445
456
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
446
457
|
#
|
447
|
-
def
|
448
|
-
|
458
|
+
def list_by_topic_next_with_http_info(next_page_link, custom_headers = nil)
|
459
|
+
list_by_topic_next_async(next_page_link, custom_headers).value!
|
449
460
|
end
|
450
461
|
|
451
462
|
#
|
452
|
-
#
|
463
|
+
# List all the subscriptions under a specified topic.
|
453
464
|
#
|
454
465
|
# @param next_page_link [String] The NextLink from the previous successful call
|
455
466
|
# to List operation.
|
@@ -458,7 +469,7 @@ module Azure::ARM::ServiceBus
|
|
458
469
|
#
|
459
470
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
460
471
|
#
|
461
|
-
def
|
472
|
+
def list_by_topic_next_async(next_page_link, custom_headers = nil)
|
462
473
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
463
474
|
|
464
475
|
|
@@ -485,7 +496,7 @@ module Azure::ARM::ServiceBus
|
|
485
496
|
response_content = http_response.body
|
486
497
|
unless status_code == 200
|
487
498
|
error_model = JSON.load(response_content)
|
488
|
-
fail
|
499
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
489
500
|
end
|
490
501
|
|
491
502
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -493,8 +504,8 @@ module Azure::ARM::ServiceBus
|
|
493
504
|
if status_code == 200
|
494
505
|
begin
|
495
506
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
496
|
-
result_mapper =
|
497
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
507
|
+
result_mapper = Azure::ARM::ServiceBus::Models::SBSubscriptionListResult.mapper()
|
508
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
498
509
|
rescue Exception => e
|
499
510
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
500
511
|
end
|
@@ -507,23 +518,24 @@ module Azure::ARM::ServiceBus
|
|
507
518
|
end
|
508
519
|
|
509
520
|
#
|
510
|
-
#
|
521
|
+
# List all the subscriptions under a specified topic.
|
511
522
|
#
|
512
|
-
# @param resource_group_name [String]
|
513
|
-
#
|
523
|
+
# @param resource_group_name [String] Name of the Resource group within the
|
524
|
+
# Azure subscription.
|
525
|
+
# @param namespace_name [String] The namespace name
|
514
526
|
# @param topic_name [String] The topic name.
|
515
527
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
516
528
|
# will be added to the HTTP request.
|
517
529
|
#
|
518
|
-
# @return [
|
530
|
+
# @return [SBSubscriptionListResult] which provide lazy access to pages of the
|
519
531
|
# response.
|
520
532
|
#
|
521
|
-
def
|
522
|
-
response =
|
533
|
+
def list_by_topic_as_lazy(resource_group_name, namespace_name, topic_name, custom_headers = nil)
|
534
|
+
response = list_by_topic_async(resource_group_name, namespace_name, topic_name, custom_headers).value!
|
523
535
|
unless response.nil?
|
524
536
|
page = response.body
|
525
537
|
page.next_method = Proc.new do |next_page_link|
|
526
|
-
|
538
|
+
list_by_topic_next_async(next_page_link, custom_headers)
|
527
539
|
end
|
528
540
|
page
|
529
541
|
end
|