azure_mgmt_network 0.6.0 → 0.7.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_network/application_gateways.rb +85 -112
- data/lib/generated/azure_mgmt_network/express_route_circuit_authorizations.rb +47 -62
- data/lib/generated/azure_mgmt_network/express_route_circuit_peerings.rb +47 -62
- data/lib/generated/azure_mgmt_network/express_route_circuits.rb +112 -148
- data/lib/generated/azure_mgmt_network/express_route_service_providers.rb +20 -26
- data/lib/generated/azure_mgmt_network/load_balancers.rb +67 -88
- data/lib/generated/azure_mgmt_network/local_network_gateways.rb +47 -62
- data/lib/generated/azure_mgmt_network/network_interfaces.rb +134 -176
- data/lib/generated/azure_mgmt_network/network_management_client.rb +64 -16
- data/lib/generated/azure_mgmt_network/network_security_groups.rb +67 -88
- data/lib/generated/azure_mgmt_network/public_ipaddresses.rb +67 -88
- data/lib/generated/azure_mgmt_network/route_tables.rb +67 -88
- data/lib/generated/azure_mgmt_network/routes.rb +47 -62
- data/lib/generated/azure_mgmt_network/security_rules.rb +47 -62
- data/lib/generated/azure_mgmt_network/subnets.rb +47 -62
- data/lib/generated/azure_mgmt_network/usages.rb +20 -26
- data/lib/generated/azure_mgmt_network/version.rb +1 -1
- data/lib/generated/azure_mgmt_network/virtual_network_gateway_connections.rb +74 -98
- data/lib/generated/azure_mgmt_network/virtual_network_gateways.rb +65 -86
- data/lib/generated/azure_mgmt_network/virtual_network_peerings.rb +47 -62
- data/lib/generated/azure_mgmt_network/virtual_networks.rb +76 -100
- metadata +5 -5
@@ -36,10 +36,6 @@ module Azure::ARM::Network
|
|
36
36
|
# is generated and included in each request. Default is true.
|
37
37
|
attr_accessor :generate_client_request_id
|
38
38
|
|
39
|
-
# @return Subscription credentials which uniquely identify client
|
40
|
-
# subscription.
|
41
|
-
attr_accessor :credentials
|
42
|
-
|
43
39
|
# @return [ApplicationGateways] application_gateways
|
44
40
|
attr_reader :application_gateways
|
45
41
|
|
@@ -138,6 +134,61 @@ module Azure::ARM::Network
|
|
138
134
|
@generate_client_request_id = true
|
139
135
|
end
|
140
136
|
|
137
|
+
#
|
138
|
+
# Makes a request and returns the body of the response.
|
139
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
140
|
+
# @param path [String] the path, relative to {base_url}.
|
141
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
142
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
143
|
+
# Example:
|
144
|
+
#
|
145
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
146
|
+
# path = "/path"
|
147
|
+
# options = {
|
148
|
+
# body: request_content,
|
149
|
+
# query_params: {'api-version' => '2016-02-01'}
|
150
|
+
# }
|
151
|
+
# result = @client.make_request(:put, path, options)
|
152
|
+
#
|
153
|
+
def make_request(method, path, options = {})
|
154
|
+
result = make_request_with_http_info(method, path, options)
|
155
|
+
result.body unless result.nil?
|
156
|
+
end
|
157
|
+
|
158
|
+
#
|
159
|
+
# Makes a request and returns the operation response.
|
160
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
161
|
+
# @param path [String] the path, relative to {base_url}.
|
162
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
163
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
164
|
+
#
|
165
|
+
def make_request_with_http_info(method, path, options = {})
|
166
|
+
result = make_request_async(method, path, options).value!
|
167
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
168
|
+
result
|
169
|
+
end
|
170
|
+
|
171
|
+
#
|
172
|
+
# Makes a request asynchronously.
|
173
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
174
|
+
# @param path [String] the path, relative to {base_url}.
|
175
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
176
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
177
|
+
#
|
178
|
+
def make_request_async(method, path, options = {})
|
179
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
180
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
181
|
+
|
182
|
+
request_url = options[:base_url] || @base_url
|
183
|
+
|
184
|
+
request_headers = @request_headers
|
185
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
186
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
187
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
188
|
+
|
189
|
+
super(request_url, method, path, options)
|
190
|
+
end
|
191
|
+
|
141
192
|
#
|
142
193
|
# Checks whether a domain name in the cloudapp.net zone is available for use.
|
143
194
|
#
|
@@ -192,30 +243,27 @@ module Azure::ARM::Network
|
|
192
243
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
193
244
|
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
194
245
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'
|
246
|
+
|
247
|
+
request_url = @base_url || self.base_url
|
248
|
+
|
195
249
|
options = {
|
196
250
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
197
251
|
path_params: {'location' => location,'subscriptionId' => subscription_id},
|
198
252
|
query_params: {'domainNameLabel' => domain_name_label,'api-version' => api_version},
|
199
|
-
headers: request_headers.merge(custom_headers || {})
|
253
|
+
headers: request_headers.merge(custom_headers || {}),
|
254
|
+
base_url: request_url
|
200
255
|
}
|
256
|
+
promise = self.make_request_async(:get, path_template, options)
|
201
257
|
|
202
|
-
|
203
|
-
|
204
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
205
|
-
promise = request.run_promise do |req|
|
206
|
-
self.credentials.sign_request(req) unless self.credentials.nil?
|
207
|
-
end
|
208
|
-
|
209
|
-
promise = promise.then do |http_response|
|
258
|
+
promise = promise.then do |result|
|
259
|
+
http_response = result.response
|
210
260
|
status_code = http_response.status
|
211
261
|
response_content = http_response.body
|
212
262
|
unless status_code == 200
|
213
263
|
error_model = JSON.load(response_content)
|
214
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
264
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
215
265
|
end
|
216
266
|
|
217
|
-
# Create Result
|
218
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
219
267
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
220
268
|
# Deserialize Response
|
221
269
|
if status_code == 200
|
@@ -123,30 +123,27 @@ module Azure::ARM::Network
|
|
123
123
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
124
124
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
125
125
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
126
|
+
|
127
|
+
request_url = @base_url || @client.base_url
|
128
|
+
|
126
129
|
options = {
|
127
130
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
128
131
|
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
129
132
|
query_params: {'api-version' => @client.api_version},
|
130
|
-
headers: request_headers.merge(custom_headers || {})
|
133
|
+
headers: request_headers.merge(custom_headers || {}),
|
134
|
+
base_url: request_url
|
131
135
|
}
|
136
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
132
137
|
|
133
|
-
|
134
|
-
|
135
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
136
|
-
promise = request.run_promise do |req|
|
137
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
138
|
-
end
|
139
|
-
|
140
|
-
promise = promise.then do |http_response|
|
138
|
+
promise = promise.then do |result|
|
139
|
+
http_response = result.response
|
141
140
|
status_code = http_response.status
|
142
141
|
response_content = http_response.body
|
143
142
|
unless status_code == 202 || status_code == 200 || status_code == 204
|
144
143
|
error_model = JSON.load(response_content)
|
145
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
144
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
146
145
|
end
|
147
146
|
|
148
|
-
# Create Result
|
149
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
150
147
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
151
148
|
|
152
149
|
result
|
@@ -216,30 +213,27 @@ module Azure::ARM::Network
|
|
216
213
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
217
214
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
218
215
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
216
|
+
|
217
|
+
request_url = @base_url || @client.base_url
|
218
|
+
|
219
219
|
options = {
|
220
220
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
221
221
|
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
222
222
|
query_params: {'api-version' => @client.api_version,'$expand' => expand},
|
223
|
-
headers: request_headers.merge(custom_headers || {})
|
223
|
+
headers: request_headers.merge(custom_headers || {}),
|
224
|
+
base_url: request_url
|
224
225
|
}
|
226
|
+
promise = @client.make_request_async(:get, path_template, options)
|
225
227
|
|
226
|
-
|
227
|
-
|
228
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
229
|
-
promise = request.run_promise do |req|
|
230
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
231
|
-
end
|
232
|
-
|
233
|
-
promise = promise.then do |http_response|
|
228
|
+
promise = promise.then do |result|
|
229
|
+
http_response = result.response
|
234
230
|
status_code = http_response.status
|
235
231
|
response_content = http_response.body
|
236
232
|
unless status_code == 200
|
237
233
|
error_model = JSON.load(response_content)
|
238
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
234
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
239
235
|
end
|
240
236
|
|
241
|
-
# Create Result
|
242
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
243
237
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
244
238
|
# Deserialize Response
|
245
239
|
if status_code == 200
|
@@ -380,31 +374,28 @@ module Azure::ARM::Network
|
|
380
374
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
381
375
|
|
382
376
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'
|
377
|
+
|
378
|
+
request_url = @base_url || @client.base_url
|
379
|
+
|
383
380
|
options = {
|
384
381
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
385
382
|
path_params: {'resourceGroupName' => resource_group_name,'networkSecurityGroupName' => network_security_group_name,'subscriptionId' => @client.subscription_id},
|
386
383
|
query_params: {'api-version' => @client.api_version},
|
387
384
|
body: request_content,
|
388
|
-
headers: request_headers.merge(custom_headers || {})
|
385
|
+
headers: request_headers.merge(custom_headers || {}),
|
386
|
+
base_url: request_url
|
389
387
|
}
|
388
|
+
promise = @client.make_request_async(:put, path_template, options)
|
390
389
|
|
391
|
-
|
392
|
-
|
393
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
394
|
-
promise = request.run_promise do |req|
|
395
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
396
|
-
end
|
397
|
-
|
398
|
-
promise = promise.then do |http_response|
|
390
|
+
promise = promise.then do |result|
|
391
|
+
http_response = result.response
|
399
392
|
status_code = http_response.status
|
400
393
|
response_content = http_response.body
|
401
394
|
unless status_code == 201 || status_code == 200
|
402
395
|
error_model = JSON.load(response_content)
|
403
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
396
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
404
397
|
end
|
405
398
|
|
406
|
-
# Create Result
|
407
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
408
399
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
409
400
|
# Deserialize Response
|
410
401
|
if status_code == 201
|
@@ -447,8 +438,8 @@ module Azure::ARM::Network
|
|
447
438
|
response = list_all_async(custom_headers).value!
|
448
439
|
unless response.nil?
|
449
440
|
page = response.body
|
450
|
-
page.next_method = Proc.new do |
|
451
|
-
list_all_next_async(
|
441
|
+
page.next_method = Proc.new do |next_page_link|
|
442
|
+
list_all_next_async(next_page_link, custom_headers)
|
452
443
|
end
|
453
444
|
page
|
454
445
|
end
|
@@ -501,30 +492,27 @@ module Azure::ARM::Network
|
|
501
492
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
502
493
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
503
494
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'
|
495
|
+
|
496
|
+
request_url = @base_url || @client.base_url
|
497
|
+
|
504
498
|
options = {
|
505
499
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
506
500
|
path_params: {'subscriptionId' => @client.subscription_id},
|
507
501
|
query_params: {'api-version' => @client.api_version},
|
508
|
-
headers: request_headers.merge(custom_headers || {})
|
502
|
+
headers: request_headers.merge(custom_headers || {}),
|
503
|
+
base_url: request_url
|
509
504
|
}
|
505
|
+
promise = @client.make_request_async(:get, path_template, options)
|
510
506
|
|
511
|
-
|
512
|
-
|
513
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
514
|
-
promise = request.run_promise do |req|
|
515
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
516
|
-
end
|
517
|
-
|
518
|
-
promise = promise.then do |http_response|
|
507
|
+
promise = promise.then do |result|
|
508
|
+
http_response = result.response
|
519
509
|
status_code = http_response.status
|
520
510
|
response_content = http_response.body
|
521
511
|
unless status_code == 200
|
522
512
|
error_model = JSON.load(response_content)
|
523
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
513
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
524
514
|
end
|
525
515
|
|
526
|
-
# Create Result
|
527
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
528
516
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
529
517
|
# Deserialize Response
|
530
518
|
if status_code == 200
|
@@ -558,8 +546,8 @@ module Azure::ARM::Network
|
|
558
546
|
response = list_async(resource_group_name, custom_headers).value!
|
559
547
|
unless response.nil?
|
560
548
|
page = response.body
|
561
|
-
page.next_method = Proc.new do |
|
562
|
-
list_next_async(
|
549
|
+
page.next_method = Proc.new do |next_page_link|
|
550
|
+
list_next_async(next_page_link, custom_headers)
|
563
551
|
end
|
564
552
|
page
|
565
553
|
end
|
@@ -616,30 +604,27 @@ module Azure::ARM::Network
|
|
616
604
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
617
605
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
618
606
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups'
|
607
|
+
|
608
|
+
request_url = @base_url || @client.base_url
|
609
|
+
|
619
610
|
options = {
|
620
611
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
621
612
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
622
613
|
query_params: {'api-version' => @client.api_version},
|
623
|
-
headers: request_headers.merge(custom_headers || {})
|
614
|
+
headers: request_headers.merge(custom_headers || {}),
|
615
|
+
base_url: request_url
|
624
616
|
}
|
617
|
+
promise = @client.make_request_async(:get, path_template, options)
|
625
618
|
|
626
|
-
|
627
|
-
|
628
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
629
|
-
promise = request.run_promise do |req|
|
630
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
631
|
-
end
|
632
|
-
|
633
|
-
promise = promise.then do |http_response|
|
619
|
+
promise = promise.then do |result|
|
620
|
+
http_response = result.response
|
634
621
|
status_code = http_response.status
|
635
622
|
response_content = http_response.body
|
636
623
|
unless status_code == 200
|
637
624
|
error_model = JSON.load(response_content)
|
638
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
625
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
639
626
|
end
|
640
627
|
|
641
|
-
# Create Result
|
642
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
643
628
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
644
629
|
# Deserialize Response
|
645
630
|
if status_code == 200
|
@@ -710,29 +695,26 @@ module Azure::ARM::Network
|
|
710
695
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
711
696
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
712
697
|
path_template = '{nextLink}'
|
698
|
+
|
699
|
+
request_url = @base_url || @client.base_url
|
700
|
+
|
713
701
|
options = {
|
714
702
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
715
703
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
716
|
-
headers: request_headers.merge(custom_headers || {})
|
704
|
+
headers: request_headers.merge(custom_headers || {}),
|
705
|
+
base_url: request_url
|
717
706
|
}
|
707
|
+
promise = @client.make_request_async(:get, path_template, options)
|
718
708
|
|
719
|
-
|
720
|
-
|
721
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
722
|
-
promise = request.run_promise do |req|
|
723
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
724
|
-
end
|
725
|
-
|
726
|
-
promise = promise.then do |http_response|
|
709
|
+
promise = promise.then do |result|
|
710
|
+
http_response = result.response
|
727
711
|
status_code = http_response.status
|
728
712
|
response_content = http_response.body
|
729
713
|
unless status_code == 200
|
730
714
|
error_model = JSON.load(response_content)
|
731
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
715
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
732
716
|
end
|
733
717
|
|
734
|
-
# Create Result
|
735
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
736
718
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
737
719
|
# Deserialize Response
|
738
720
|
if status_code == 200
|
@@ -803,29 +785,26 @@ module Azure::ARM::Network
|
|
803
785
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
804
786
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
805
787
|
path_template = '{nextLink}'
|
788
|
+
|
789
|
+
request_url = @base_url || @client.base_url
|
790
|
+
|
806
791
|
options = {
|
807
792
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
808
793
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
809
|
-
headers: request_headers.merge(custom_headers || {})
|
794
|
+
headers: request_headers.merge(custom_headers || {}),
|
795
|
+
base_url: request_url
|
810
796
|
}
|
797
|
+
promise = @client.make_request_async(:get, path_template, options)
|
811
798
|
|
812
|
-
|
813
|
-
|
814
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
815
|
-
promise = request.run_promise do |req|
|
816
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
817
|
-
end
|
818
|
-
|
819
|
-
promise = promise.then do |http_response|
|
799
|
+
promise = promise.then do |result|
|
800
|
+
http_response = result.response
|
820
801
|
status_code = http_response.status
|
821
802
|
response_content = http_response.body
|
822
803
|
unless status_code == 200
|
823
804
|
error_model = JSON.load(response_content)
|
824
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
805
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
825
806
|
end
|
826
807
|
|
827
|
-
# Create Result
|
828
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
829
808
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
830
809
|
# Deserialize Response
|
831
810
|
if status_code == 200
|
@@ -114,30 +114,27 @@ module Azure::ARM::Network
|
|
114
114
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
115
115
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
116
116
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'
|
117
|
+
|
118
|
+
request_url = @base_url || @client.base_url
|
119
|
+
|
117
120
|
options = {
|
118
121
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
119
122
|
path_params: {'resourceGroupName' => resource_group_name,'publicIpAddressName' => public_ip_address_name,'subscriptionId' => @client.subscription_id},
|
120
123
|
query_params: {'api-version' => @client.api_version},
|
121
|
-
headers: request_headers.merge(custom_headers || {})
|
124
|
+
headers: request_headers.merge(custom_headers || {}),
|
125
|
+
base_url: request_url
|
122
126
|
}
|
127
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
123
128
|
|
124
|
-
|
125
|
-
|
126
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
127
|
-
promise = request.run_promise do |req|
|
128
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
129
|
-
end
|
130
|
-
|
131
|
-
promise = promise.then do |http_response|
|
129
|
+
promise = promise.then do |result|
|
130
|
+
http_response = result.response
|
132
131
|
status_code = http_response.status
|
133
132
|
response_content = http_response.body
|
134
133
|
unless status_code == 204 || status_code == 202 || status_code == 200
|
135
134
|
error_model = JSON.load(response_content)
|
136
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
135
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
137
136
|
end
|
138
137
|
|
139
|
-
# Create Result
|
140
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
141
138
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
142
139
|
|
143
140
|
result
|
@@ -204,30 +201,27 @@ module Azure::ARM::Network
|
|
204
201
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
205
202
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
206
203
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'
|
204
|
+
|
205
|
+
request_url = @base_url || @client.base_url
|
206
|
+
|
207
207
|
options = {
|
208
208
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
209
209
|
path_params: {'resourceGroupName' => resource_group_name,'publicIpAddressName' => public_ip_address_name,'subscriptionId' => @client.subscription_id},
|
210
210
|
query_params: {'api-version' => @client.api_version,'$expand' => expand},
|
211
|
-
headers: request_headers.merge(custom_headers || {})
|
211
|
+
headers: request_headers.merge(custom_headers || {}),
|
212
|
+
base_url: request_url
|
212
213
|
}
|
214
|
+
promise = @client.make_request_async(:get, path_template, options)
|
213
215
|
|
214
|
-
|
215
|
-
|
216
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
217
|
-
promise = request.run_promise do |req|
|
218
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
219
|
-
end
|
220
|
-
|
221
|
-
promise = promise.then do |http_response|
|
216
|
+
promise = promise.then do |result|
|
217
|
+
http_response = result.response
|
222
218
|
status_code = http_response.status
|
223
219
|
response_content = http_response.body
|
224
220
|
unless status_code == 200
|
225
221
|
error_model = JSON.load(response_content)
|
226
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
222
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
227
223
|
end
|
228
224
|
|
229
|
-
# Create Result
|
230
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
231
225
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
232
226
|
# Deserialize Response
|
233
227
|
if status_code == 200
|
@@ -363,31 +357,28 @@ module Azure::ARM::Network
|
|
363
357
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
364
358
|
|
365
359
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'
|
360
|
+
|
361
|
+
request_url = @base_url || @client.base_url
|
362
|
+
|
366
363
|
options = {
|
367
364
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
368
365
|
path_params: {'resourceGroupName' => resource_group_name,'publicIpAddressName' => public_ip_address_name,'subscriptionId' => @client.subscription_id},
|
369
366
|
query_params: {'api-version' => @client.api_version},
|
370
367
|
body: request_content,
|
371
|
-
headers: request_headers.merge(custom_headers || {})
|
368
|
+
headers: request_headers.merge(custom_headers || {}),
|
369
|
+
base_url: request_url
|
372
370
|
}
|
371
|
+
promise = @client.make_request_async(:put, path_template, options)
|
373
372
|
|
374
|
-
|
375
|
-
|
376
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
377
|
-
promise = request.run_promise do |req|
|
378
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
379
|
-
end
|
380
|
-
|
381
|
-
promise = promise.then do |http_response|
|
373
|
+
promise = promise.then do |result|
|
374
|
+
http_response = result.response
|
382
375
|
status_code = http_response.status
|
383
376
|
response_content = http_response.body
|
384
377
|
unless status_code == 201 || status_code == 200
|
385
378
|
error_model = JSON.load(response_content)
|
386
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
379
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
387
380
|
end
|
388
381
|
|
389
|
-
# Create Result
|
390
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
391
382
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
392
383
|
# Deserialize Response
|
393
384
|
if status_code == 201
|
@@ -430,8 +421,8 @@ module Azure::ARM::Network
|
|
430
421
|
response = list_all_async(custom_headers).value!
|
431
422
|
unless response.nil?
|
432
423
|
page = response.body
|
433
|
-
page.next_method = Proc.new do |
|
434
|
-
list_all_next_async(
|
424
|
+
page.next_method = Proc.new do |next_page_link|
|
425
|
+
list_all_next_async(next_page_link, custom_headers)
|
435
426
|
end
|
436
427
|
page
|
437
428
|
end
|
@@ -484,30 +475,27 @@ module Azure::ARM::Network
|
|
484
475
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
485
476
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
486
477
|
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses'
|
478
|
+
|
479
|
+
request_url = @base_url || @client.base_url
|
480
|
+
|
487
481
|
options = {
|
488
482
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
489
483
|
path_params: {'subscriptionId' => @client.subscription_id},
|
490
484
|
query_params: {'api-version' => @client.api_version},
|
491
|
-
headers: request_headers.merge(custom_headers || {})
|
485
|
+
headers: request_headers.merge(custom_headers || {}),
|
486
|
+
base_url: request_url
|
492
487
|
}
|
488
|
+
promise = @client.make_request_async(:get, path_template, options)
|
493
489
|
|
494
|
-
|
495
|
-
|
496
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
497
|
-
promise = request.run_promise do |req|
|
498
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
499
|
-
end
|
500
|
-
|
501
|
-
promise = promise.then do |http_response|
|
490
|
+
promise = promise.then do |result|
|
491
|
+
http_response = result.response
|
502
492
|
status_code = http_response.status
|
503
493
|
response_content = http_response.body
|
504
494
|
unless status_code == 200
|
505
495
|
error_model = JSON.load(response_content)
|
506
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
496
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
507
497
|
end
|
508
498
|
|
509
|
-
# Create Result
|
510
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
511
499
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
512
500
|
# Deserialize Response
|
513
501
|
if status_code == 200
|
@@ -541,8 +529,8 @@ module Azure::ARM::Network
|
|
541
529
|
response = list_async(resource_group_name, custom_headers).value!
|
542
530
|
unless response.nil?
|
543
531
|
page = response.body
|
544
|
-
page.next_method = Proc.new do |
|
545
|
-
list_next_async(
|
532
|
+
page.next_method = Proc.new do |next_page_link|
|
533
|
+
list_next_async(next_page_link, custom_headers)
|
546
534
|
end
|
547
535
|
page
|
548
536
|
end
|
@@ -599,30 +587,27 @@ module Azure::ARM::Network
|
|
599
587
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
600
588
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
601
589
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses'
|
590
|
+
|
591
|
+
request_url = @base_url || @client.base_url
|
592
|
+
|
602
593
|
options = {
|
603
594
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
604
595
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
605
596
|
query_params: {'api-version' => @client.api_version},
|
606
|
-
headers: request_headers.merge(custom_headers || {})
|
597
|
+
headers: request_headers.merge(custom_headers || {}),
|
598
|
+
base_url: request_url
|
607
599
|
}
|
600
|
+
promise = @client.make_request_async(:get, path_template, options)
|
608
601
|
|
609
|
-
|
610
|
-
|
611
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
612
|
-
promise = request.run_promise do |req|
|
613
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
614
|
-
end
|
615
|
-
|
616
|
-
promise = promise.then do |http_response|
|
602
|
+
promise = promise.then do |result|
|
603
|
+
http_response = result.response
|
617
604
|
status_code = http_response.status
|
618
605
|
response_content = http_response.body
|
619
606
|
unless status_code == 200
|
620
607
|
error_model = JSON.load(response_content)
|
621
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
608
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
622
609
|
end
|
623
610
|
|
624
|
-
# Create Result
|
625
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
626
611
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
627
612
|
# Deserialize Response
|
628
613
|
if status_code == 200
|
@@ -693,29 +678,26 @@ module Azure::ARM::Network
|
|
693
678
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
694
679
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
695
680
|
path_template = '{nextLink}'
|
681
|
+
|
682
|
+
request_url = @base_url || @client.base_url
|
683
|
+
|
696
684
|
options = {
|
697
685
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
698
686
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
699
|
-
headers: request_headers.merge(custom_headers || {})
|
687
|
+
headers: request_headers.merge(custom_headers || {}),
|
688
|
+
base_url: request_url
|
700
689
|
}
|
690
|
+
promise = @client.make_request_async(:get, path_template, options)
|
701
691
|
|
702
|
-
|
703
|
-
|
704
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
705
|
-
promise = request.run_promise do |req|
|
706
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
707
|
-
end
|
708
|
-
|
709
|
-
promise = promise.then do |http_response|
|
692
|
+
promise = promise.then do |result|
|
693
|
+
http_response = result.response
|
710
694
|
status_code = http_response.status
|
711
695
|
response_content = http_response.body
|
712
696
|
unless status_code == 200
|
713
697
|
error_model = JSON.load(response_content)
|
714
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
698
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
715
699
|
end
|
716
700
|
|
717
|
-
# Create Result
|
718
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
719
701
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
720
702
|
# Deserialize Response
|
721
703
|
if status_code == 200
|
@@ -786,29 +768,26 @@ module Azure::ARM::Network
|
|
786
768
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
787
769
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
788
770
|
path_template = '{nextLink}'
|
771
|
+
|
772
|
+
request_url = @base_url || @client.base_url
|
773
|
+
|
789
774
|
options = {
|
790
775
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
791
776
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
792
|
-
headers: request_headers.merge(custom_headers || {})
|
777
|
+
headers: request_headers.merge(custom_headers || {}),
|
778
|
+
base_url: request_url
|
793
779
|
}
|
780
|
+
promise = @client.make_request_async(:get, path_template, options)
|
794
781
|
|
795
|
-
|
796
|
-
|
797
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
798
|
-
promise = request.run_promise do |req|
|
799
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
800
|
-
end
|
801
|
-
|
802
|
-
promise = promise.then do |http_response|
|
782
|
+
promise = promise.then do |result|
|
783
|
+
http_response = result.response
|
803
784
|
status_code = http_response.status
|
804
785
|
response_content = http_response.body
|
805
786
|
unless status_code == 200
|
806
787
|
error_model = JSON.load(response_content)
|
807
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
788
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
808
789
|
end
|
809
790
|
|
810
|
-
# Create Result
|
811
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
812
791
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
813
792
|
# Deserialize Response
|
814
793
|
if status_code == 200
|