azure_mgmt_service_bus 0.16.0 → 0.17.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/check_name_availability.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/namespace_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/operation_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/queue_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/resource.rb +9 -0
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/shared_access_authorization_rule_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/subscription_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_create_or_update_parameters.rb +0 -12
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_list_result.rb +1 -1
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/models/topic_resource.rb +0 -12
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/namespaces.rb +15 -15
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/queues.rb +126 -15
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +7 -6
- data/lib/2015-08-01/generated/azure_mgmt_service_bus/topics.rb +129 -18
- data/lib/2017-04-01/generated/azure_mgmt_service_bus.rb +31 -20
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/disaster_recovery_configs.rb +9 -9
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/migration_configs.rb +777 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/arm_disaster_recovery.rb +14 -2
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/arm_disaster_recovery_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/check_name_availability.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/correlation_filter.rb +19 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/default_action.rb +16 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/error_response.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/event_hub_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/migration_config_list_result.rb +100 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/migration_config_properties.rb +123 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/name_space_type.rb +19 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/network_rule_ipaction.rb +15 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/network_rule_set.rb +114 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/nwrule_set_ip_rules.rb +59 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/nwrule_set_virtual_network_rules.rb +59 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/operation_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/premium_messaging_regions_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/regenerate_access_key_parameters.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/resource.rb +9 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/rule_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbauthorization_rule_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace_migrate.rb +48 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbqueue.rb +12 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbqueue_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbsubscription_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbtopic.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/sbtopic_list_result.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/models/subnet.rb +46 -0
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/namespaces.rb +326 -15
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/queues.rb +51 -23
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/rules.rb +36 -8
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/service_bus_management_client.rb +11 -6
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/subscriptions.rb +36 -8
- data/lib/2017-04-01/generated/azure_mgmt_service_bus/topics.rb +54 -26
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus.rb +53 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/default_action.rb +16 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/error_response.rb +58 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/ip_filter_rule.rb +96 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/ip_filter_rule_list_result.rb +100 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/ipaction.rb +16 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/network_rule_ipaction.rb +15 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/network_rule_set.rb +114 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/nwrule_set_ip_rules.rb +58 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/nwrule_set_virtual_network_rules.rb +59 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/operation.rb +59 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/operation_display.rb +72 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/operation_list_result.rb +103 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/resource.rb +80 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/resource_namespace_patch.rb +92 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbnamespace.rb +171 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbnamespace_list_result.rb +99 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbnamespace_update_parameters.rb +171 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sbsku.rb +73 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sku_name.rb +17 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/sku_tier.rb +17 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/subnet.rb +46 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/tracked_resource.rb +92 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/virtual_network_rule.rb +73 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/models/virtual_network_rule_list_result.rb +100 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/module_definition.rb +9 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/namespaces.rb +2211 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/operations.rb +216 -0
- data/lib/2018-01-01-preview/generated/azure_mgmt_service_bus/service_bus_management_client.rb +137 -0
- data/lib/azure_mgmt_service_bus.rb +2 -1
- data/lib/profiles/latest/modules/servicebus_profile_module.rb +107 -65
- data/lib/version.rb +1 -1
- metadata +45 -5
@@ -0,0 +1,216 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ServiceBus::Mgmt::V2018_01_01_preview
|
7
|
+
#
|
8
|
+
# Azure Service Bus client for managing Namespace, IPFilter Rules,
|
9
|
+
# VirtualNetworkRules and Zone Redundant
|
10
|
+
#
|
11
|
+
class Operations
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the Operations class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [ServiceBusManagementClient] reference to the ServiceBusManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Lists all of the available ServiceBus REST API operations.
|
27
|
+
#
|
28
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
29
|
+
# will be added to the HTTP request.
|
30
|
+
#
|
31
|
+
# @return [Array<Operation>] operation results.
|
32
|
+
#
|
33
|
+
def list(custom_headers:nil)
|
34
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
35
|
+
first_page.get_all_items
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Lists all of the available ServiceBus REST API operations.
|
40
|
+
#
|
41
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
42
|
+
# will be added to the HTTP request.
|
43
|
+
#
|
44
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
45
|
+
#
|
46
|
+
def list_with_http_info(custom_headers:nil)
|
47
|
+
list_async(custom_headers:custom_headers).value!
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# Lists all of the available ServiceBus REST API operations.
|
52
|
+
#
|
53
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
54
|
+
# to the HTTP request.
|
55
|
+
#
|
56
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
57
|
+
#
|
58
|
+
def list_async(custom_headers:nil)
|
59
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
60
|
+
|
61
|
+
|
62
|
+
request_headers = {}
|
63
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
64
|
+
|
65
|
+
# Set Headers
|
66
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
67
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
68
|
+
path_template = 'providers/Microsoft.ServiceBus/operations'
|
69
|
+
|
70
|
+
request_url = @base_url || @client.base_url
|
71
|
+
|
72
|
+
options = {
|
73
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
74
|
+
query_params: {'api-version' => @client.api_version},
|
75
|
+
headers: request_headers.merge(custom_headers || {}),
|
76
|
+
base_url: request_url
|
77
|
+
}
|
78
|
+
promise = @client.make_request_async(:get, path_template, options)
|
79
|
+
|
80
|
+
promise = promise.then do |result|
|
81
|
+
http_response = result.response
|
82
|
+
status_code = http_response.status
|
83
|
+
response_content = http_response.body
|
84
|
+
unless status_code == 200
|
85
|
+
error_model = JSON.load(response_content)
|
86
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
87
|
+
end
|
88
|
+
|
89
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
90
|
+
# Deserialize Response
|
91
|
+
if status_code == 200
|
92
|
+
begin
|
93
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
94
|
+
result_mapper = Azure::ServiceBus::Mgmt::V2018_01_01_preview::Models::OperationListResult.mapper()
|
95
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
96
|
+
rescue Exception => e
|
97
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
result
|
102
|
+
end
|
103
|
+
|
104
|
+
promise.execute
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
# Lists all of the available ServiceBus REST API operations.
|
109
|
+
#
|
110
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
111
|
+
# to List operation.
|
112
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
113
|
+
# will be added to the HTTP request.
|
114
|
+
#
|
115
|
+
# @return [OperationListResult] operation results.
|
116
|
+
#
|
117
|
+
def list_next(next_page_link, custom_headers:nil)
|
118
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
119
|
+
response.body unless response.nil?
|
120
|
+
end
|
121
|
+
|
122
|
+
#
|
123
|
+
# Lists all of the available ServiceBus REST API operations.
|
124
|
+
#
|
125
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
126
|
+
# to List operation.
|
127
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
128
|
+
# will be added to the HTTP request.
|
129
|
+
#
|
130
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
131
|
+
#
|
132
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
133
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Lists all of the available ServiceBus REST API operations.
|
138
|
+
#
|
139
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
140
|
+
# to List operation.
|
141
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
142
|
+
# to the HTTP request.
|
143
|
+
#
|
144
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
145
|
+
#
|
146
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
147
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
148
|
+
|
149
|
+
|
150
|
+
request_headers = {}
|
151
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
152
|
+
|
153
|
+
# Set Headers
|
154
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
155
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
156
|
+
path_template = '{nextLink}'
|
157
|
+
|
158
|
+
request_url = @base_url || @client.base_url
|
159
|
+
|
160
|
+
options = {
|
161
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
162
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
163
|
+
headers: request_headers.merge(custom_headers || {}),
|
164
|
+
base_url: request_url
|
165
|
+
}
|
166
|
+
promise = @client.make_request_async(:get, path_template, options)
|
167
|
+
|
168
|
+
promise = promise.then do |result|
|
169
|
+
http_response = result.response
|
170
|
+
status_code = http_response.status
|
171
|
+
response_content = http_response.body
|
172
|
+
unless status_code == 200
|
173
|
+
error_model = JSON.load(response_content)
|
174
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
175
|
+
end
|
176
|
+
|
177
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
178
|
+
# Deserialize Response
|
179
|
+
if status_code == 200
|
180
|
+
begin
|
181
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
182
|
+
result_mapper = Azure::ServiceBus::Mgmt::V2018_01_01_preview::Models::OperationListResult.mapper()
|
183
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
184
|
+
rescue Exception => e
|
185
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
result
|
190
|
+
end
|
191
|
+
|
192
|
+
promise.execute
|
193
|
+
end
|
194
|
+
|
195
|
+
#
|
196
|
+
# Lists all of the available ServiceBus REST API operations.
|
197
|
+
#
|
198
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
199
|
+
# will be added to the HTTP request.
|
200
|
+
#
|
201
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
202
|
+
# response.
|
203
|
+
#
|
204
|
+
def list_as_lazy(custom_headers:nil)
|
205
|
+
response = list_async(custom_headers:custom_headers).value!
|
206
|
+
unless response.nil?
|
207
|
+
page = response.body
|
208
|
+
page.next_method = Proc.new do |next_page_link|
|
209
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
210
|
+
end
|
211
|
+
page
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ServiceBus::Mgmt::V2018_01_01_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class ServiceBusManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Subscription credentials that uniquely identify a
|
21
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
+
# for every service call.
|
23
|
+
attr_accessor :subscription_id
|
24
|
+
|
25
|
+
# @return [String] Client API version.
|
26
|
+
attr_reader :api_version
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [Operations] operations
|
41
|
+
attr_reader :operations
|
42
|
+
|
43
|
+
# @return [Namespaces] namespaces
|
44
|
+
attr_reader :namespaces
|
45
|
+
|
46
|
+
#
|
47
|
+
# Creates initializes a new instance of the ServiceBusManagementClient class.
|
48
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
49
|
+
# @param base_url [String] the base URI of the service.
|
50
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
51
|
+
#
|
52
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
53
|
+
super(credentials, options)
|
54
|
+
@base_url = base_url || 'https://management.azure.com'
|
55
|
+
|
56
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
57
|
+
@credentials = credentials
|
58
|
+
|
59
|
+
@operations = Operations.new(self)
|
60
|
+
@namespaces = Namespaces.new(self)
|
61
|
+
@api_version = '2018-01-01-preview'
|
62
|
+
@accept_language = 'en-US'
|
63
|
+
@long_running_operation_retry_timeout = 30
|
64
|
+
@generate_client_request_id = true
|
65
|
+
add_telemetry
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# Makes a request and returns the body of the response.
|
70
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
71
|
+
# @param path [String] the path, relative to {base_url}.
|
72
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
73
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
74
|
+
# Example:
|
75
|
+
#
|
76
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
77
|
+
# path = "/path"
|
78
|
+
# options = {
|
79
|
+
# body: request_content,
|
80
|
+
# query_params: {'api-version' => '2016-02-01'}
|
81
|
+
# }
|
82
|
+
# result = @client.make_request(:put, path, options)
|
83
|
+
#
|
84
|
+
def make_request(method, path, options = {})
|
85
|
+
result = make_request_with_http_info(method, path, options)
|
86
|
+
result.body unless result.nil?
|
87
|
+
end
|
88
|
+
|
89
|
+
#
|
90
|
+
# Makes a request and returns the operation response.
|
91
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
92
|
+
# @param path [String] the path, relative to {base_url}.
|
93
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
94
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
95
|
+
#
|
96
|
+
def make_request_with_http_info(method, path, options = {})
|
97
|
+
result = make_request_async(method, path, options).value!
|
98
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
99
|
+
result
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# Makes a request asynchronously.
|
104
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
105
|
+
# @param path [String] the path, relative to {base_url}.
|
106
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
107
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
108
|
+
#
|
109
|
+
def make_request_async(method, path, options = {})
|
110
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
111
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
112
|
+
|
113
|
+
request_url = options[:base_url] || @base_url
|
114
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
115
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
116
|
+
end
|
117
|
+
|
118
|
+
request_headers = @request_headers
|
119
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
120
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
121
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
122
|
+
|
123
|
+
super(request_url, method, path, options)
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
private
|
128
|
+
#
|
129
|
+
# Adds telemetry information.
|
130
|
+
#
|
131
|
+
def add_telemetry
|
132
|
+
sdk_information = 'azure_mgmt_service_bus'
|
133
|
+
sdk_information = "#{sdk_information}/0.17.4"
|
134
|
+
add_user_agent_information(sdk_information)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
4
|
|
5
|
-
require '2015-08-01/generated/azure_mgmt_service_bus'
|
6
5
|
require '2017-04-01/generated/azure_mgmt_service_bus'
|
6
|
+
require '2018-01-01-preview/generated/azure_mgmt_service_bus'
|
7
|
+
require '2015-08-01/generated/azure_mgmt_service_bus'
|
7
8
|
require 'profiles/latest/servicebus_latest_profile_client'
|
@@ -9,6 +9,7 @@ module Azure::ServiceBus::Profiles::Latest
|
|
9
9
|
Operations = Azure::ServiceBus::Mgmt::V2017_04_01::Operations
|
10
10
|
Namespaces = Azure::ServiceBus::Mgmt::V2017_04_01::Namespaces
|
11
11
|
DisasterRecoveryConfigs = Azure::ServiceBus::Mgmt::V2017_04_01::DisasterRecoveryConfigs
|
12
|
+
MigrationConfigs = Azure::ServiceBus::Mgmt::V2017_04_01::MigrationConfigs
|
12
13
|
Queues = Azure::ServiceBus::Mgmt::V2017_04_01::Queues
|
13
14
|
Topics = Azure::ServiceBus::Mgmt::V2017_04_01::Topics
|
14
15
|
Subscriptions = Azure::ServiceBus::Mgmt::V2017_04_01::Subscriptions
|
@@ -18,33 +19,38 @@ module Azure::ServiceBus::Profiles::Latest
|
|
18
19
|
EventHubs = Azure::ServiceBus::Mgmt::V2017_04_01::EventHubs
|
19
20
|
|
20
21
|
module Models
|
21
|
-
|
22
|
-
|
22
|
+
Operation = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation
|
23
|
+
OperationListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationListResult
|
23
24
|
Resource = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Resource
|
24
|
-
|
25
|
+
ErrorResponse = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ErrorResponse
|
25
26
|
SBSku = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSku
|
26
|
-
|
27
|
+
Action = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Action
|
27
28
|
SBNamespaceListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceListResult
|
28
|
-
|
29
|
+
SqlFilter = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SqlFilter
|
30
|
+
SBNamespaceMigrate = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceMigrate
|
31
|
+
CorrelationFilter = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CorrelationFilter
|
32
|
+
SBAuthorizationRuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult
|
33
|
+
OperationDisplay = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay
|
34
|
+
AccessKeys = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessKeys
|
35
|
+
RegenerateAccessKeyParameters = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters
|
36
|
+
PremiumMessagingRegionsListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsListResult
|
37
|
+
ArmDisasterRecoveryListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult
|
38
|
+
NWRuleSetIpRules = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NWRuleSetIpRules
|
39
|
+
MigrationConfigListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::MigrationConfigListResult
|
40
|
+
Subnet = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Subnet
|
41
|
+
EventHubListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::EventHubListResult
|
29
42
|
CaptureDescription = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CaptureDescription
|
30
|
-
SBSubscriptionListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscriptionListResult
|
31
|
-
AuthorizationRuleProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AuthorizationRuleProperties
|
32
43
|
CheckNameAvailability = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailability
|
33
|
-
RegenerateAccessKeyParameters = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters
|
34
|
-
RuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult
|
35
44
|
Destination = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Destination
|
36
|
-
OperationDisplay = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay
|
37
|
-
ArmDisasterRecoveryListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult
|
38
|
-
Operation = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation
|
39
|
-
SBAuthorizationRuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult
|
40
|
-
OperationListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationListResult
|
41
45
|
MessageCountDetails = Azure::ServiceBus::Mgmt::V2017_04_01::Models::MessageCountDetails
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
AuthorizationRuleProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AuthorizationRuleProperties
|
47
|
+
SBTopicListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBTopicListResult
|
48
|
+
CheckNameAvailabilityResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult
|
49
|
+
RuleListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult
|
50
|
+
SBSubscriptionListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscriptionListResult
|
51
|
+
NWRuleSetVirtualNetworkRules = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NWRuleSetVirtualNetworkRules
|
52
|
+
SBQueueListResult = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBQueueListResult
|
53
|
+
PremiumMessagingRegionsProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsProperties
|
48
54
|
TrackedResource = Azure::ServiceBus::Mgmt::V2017_04_01::Models::TrackedResource
|
49
55
|
ResourceNamespacePatch = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ResourceNamespacePatch
|
50
56
|
SBNamespace = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespace
|
@@ -58,8 +64,11 @@ module Azure::ServiceBus::Profiles::Latest
|
|
58
64
|
PremiumMessagingRegions = Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegions
|
59
65
|
Eventhub = Azure::ServiceBus::Mgmt::V2017_04_01::Models::Eventhub
|
60
66
|
ArmDisasterRecovery = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecovery
|
67
|
+
MigrationConfigProperties = Azure::ServiceBus::Mgmt::V2017_04_01::Models::MigrationConfigProperties
|
68
|
+
NetworkRuleSet = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleSet
|
61
69
|
SkuName = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SkuName
|
62
70
|
SkuTier = Azure::ServiceBus::Mgmt::V2017_04_01::Models::SkuTier
|
71
|
+
NameSpaceType = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NameSpaceType
|
63
72
|
AccessRights = Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessRights
|
64
73
|
KeyType = Azure::ServiceBus::Mgmt::V2017_04_01::Models::KeyType
|
65
74
|
EntityStatus = Azure::ServiceBus::Mgmt::V2017_04_01::Models::EntityStatus
|
@@ -68,13 +77,15 @@ module Azure::ServiceBus::Profiles::Latest
|
|
68
77
|
EncodingCaptureDescription = Azure::ServiceBus::Mgmt::V2017_04_01::Models::EncodingCaptureDescription
|
69
78
|
ProvisioningStateDR = Azure::ServiceBus::Mgmt::V2017_04_01::Models::ProvisioningStateDR
|
70
79
|
RoleDisasterRecovery = Azure::ServiceBus::Mgmt::V2017_04_01::Models::RoleDisasterRecovery
|
80
|
+
NetworkRuleIPAction = Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleIPAction
|
81
|
+
DefaultAction = Azure::ServiceBus::Mgmt::V2017_04_01::Models::DefaultAction
|
71
82
|
end
|
72
83
|
|
73
84
|
#
|
74
85
|
# ServiceBusManagementClass
|
75
86
|
#
|
76
87
|
class ServiceBusManagementClass
|
77
|
-
attr_reader :operations, :namespaces, :disaster_recovery_configs, :queues, :topics, :subscriptions, :rules, :regions, :premium_messaging_regions_operations, :event_hubs, :configurable, :base_url, :options, :model_classes
|
88
|
+
attr_reader :operations, :namespaces, :disaster_recovery_configs, :migration_configs, :queues, :topics, :subscriptions, :rules, :regions, :premium_messaging_regions_operations, :event_hubs, :configurable, :base_url, :options, :model_classes
|
78
89
|
|
79
90
|
def initialize(options = {})
|
80
91
|
if options.is_a?(Hash) && options.length == 0
|
@@ -97,6 +108,7 @@ module Azure::ServiceBus::Profiles::Latest
|
|
97
108
|
@operations = @client_0.operations
|
98
109
|
@namespaces = @client_0.namespaces
|
99
110
|
@disaster_recovery_configs = @client_0.disaster_recovery_configs
|
111
|
+
@migration_configs = @client_0.migration_configs
|
100
112
|
@queues = @client_0.queues
|
101
113
|
@topics = @client_0.topics
|
102
114
|
@subscriptions = @client_0.subscriptions
|
@@ -124,86 +136,101 @@ module Azure::ServiceBus::Profiles::Latest
|
|
124
136
|
end
|
125
137
|
|
126
138
|
class ModelClasses
|
127
|
-
def
|
128
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
139
|
+
def operation
|
140
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::Operation
|
129
141
|
end
|
130
|
-
def
|
131
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
142
|
+
def operation_list_result
|
143
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationListResult
|
132
144
|
end
|
133
145
|
def resource
|
134
146
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::Resource
|
135
147
|
end
|
136
|
-
def
|
137
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
148
|
+
def error_response
|
149
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::ErrorResponse
|
138
150
|
end
|
139
151
|
def sbsku
|
140
152
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSku
|
141
153
|
end
|
142
|
-
def
|
143
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
154
|
+
def action
|
155
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::Action
|
144
156
|
end
|
145
157
|
def sbnamespace_list_result
|
146
158
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceListResult
|
147
159
|
end
|
148
|
-
def
|
149
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
160
|
+
def sql_filter
|
161
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SqlFilter
|
150
162
|
end
|
151
|
-
def
|
152
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
163
|
+
def sbnamespace_migrate
|
164
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBNamespaceMigrate
|
153
165
|
end
|
154
|
-
def
|
155
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
166
|
+
def correlation_filter
|
167
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::CorrelationFilter
|
156
168
|
end
|
157
|
-
def
|
158
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
169
|
+
def sbauthorization_rule_list_result
|
170
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBAuthorizationRuleListResult
|
159
171
|
end
|
160
|
-
def
|
161
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
172
|
+
def operation_display
|
173
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay
|
174
|
+
end
|
175
|
+
def access_keys
|
176
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessKeys
|
162
177
|
end
|
163
178
|
def regenerate_access_key_parameters
|
164
179
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::RegenerateAccessKeyParameters
|
165
180
|
end
|
166
|
-
def
|
167
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
168
|
-
end
|
169
|
-
def destination
|
170
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::Destination
|
171
|
-
end
|
172
|
-
def operation_display
|
173
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::OperationDisplay
|
181
|
+
def premium_messaging_regions_list_result
|
182
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsListResult
|
174
183
|
end
|
175
184
|
def arm_disaster_recovery_list_result
|
176
185
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecoveryListResult
|
177
186
|
end
|
178
|
-
def
|
179
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
187
|
+
def nwrule_set_ip_rules
|
188
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::NWRuleSetIpRules
|
180
189
|
end
|
181
|
-
def
|
182
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
190
|
+
def migration_config_list_result
|
191
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::MigrationConfigListResult
|
183
192
|
end
|
184
|
-
def
|
185
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
193
|
+
def subnet
|
194
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::Subnet
|
195
|
+
end
|
196
|
+
def event_hub_list_result
|
197
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::EventHubListResult
|
198
|
+
end
|
199
|
+
def capture_description
|
200
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::CaptureDescription
|
201
|
+
end
|
202
|
+
def check_name_availability
|
203
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailability
|
204
|
+
end
|
205
|
+
def destination
|
206
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::Destination
|
186
207
|
end
|
187
208
|
def message_count_details
|
188
209
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::MessageCountDetails
|
189
210
|
end
|
190
|
-
def
|
191
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
211
|
+
def authorization_rule_properties
|
212
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::AuthorizationRuleProperties
|
192
213
|
end
|
193
|
-
def
|
194
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
214
|
+
def sbtopic_list_result
|
215
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBTopicListResult
|
195
216
|
end
|
196
|
-
def
|
197
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
217
|
+
def check_name_availability_result
|
218
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::CheckNameAvailabilityResult
|
198
219
|
end
|
199
|
-
def
|
200
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
220
|
+
def rule_list_result
|
221
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::RuleListResult
|
201
222
|
end
|
202
|
-
def
|
203
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
223
|
+
def sbsubscription_list_result
|
224
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBSubscriptionListResult
|
204
225
|
end
|
205
|
-
def
|
206
|
-
Azure::ServiceBus::Mgmt::V2017_04_01::Models::
|
226
|
+
def nwrule_set_virtual_network_rules
|
227
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::NWRuleSetVirtualNetworkRules
|
228
|
+
end
|
229
|
+
def sbqueue_list_result
|
230
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SBQueueListResult
|
231
|
+
end
|
232
|
+
def premium_messaging_regions_properties
|
233
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::PremiumMessagingRegionsProperties
|
207
234
|
end
|
208
235
|
def tracked_resource
|
209
236
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::TrackedResource
|
@@ -244,12 +271,21 @@ module Azure::ServiceBus::Profiles::Latest
|
|
244
271
|
def arm_disaster_recovery
|
245
272
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::ArmDisasterRecovery
|
246
273
|
end
|
274
|
+
def migration_config_properties
|
275
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::MigrationConfigProperties
|
276
|
+
end
|
277
|
+
def network_rule_set
|
278
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleSet
|
279
|
+
end
|
247
280
|
def sku_name
|
248
281
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SkuName
|
249
282
|
end
|
250
283
|
def sku_tier
|
251
284
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::SkuTier
|
252
285
|
end
|
286
|
+
def name_space_type
|
287
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::NameSpaceType
|
288
|
+
end
|
253
289
|
def access_rights
|
254
290
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::AccessRights
|
255
291
|
end
|
@@ -274,6 +310,12 @@ module Azure::ServiceBus::Profiles::Latest
|
|
274
310
|
def role_disaster_recovery
|
275
311
|
Azure::ServiceBus::Mgmt::V2017_04_01::Models::RoleDisasterRecovery
|
276
312
|
end
|
313
|
+
def network_rule_ipaction
|
314
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::NetworkRuleIPAction
|
315
|
+
end
|
316
|
+
def default_action
|
317
|
+
Azure::ServiceBus::Mgmt::V2017_04_01::Models::DefaultAction
|
318
|
+
end
|
277
319
|
end
|
278
320
|
end
|
279
321
|
end
|