azure_mgmt_resources 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_resources/deployment_operations.rb +29 -38
- data/lib/generated/azure_mgmt_resources/deployments.rb +83 -110
- data/lib/generated/azure_mgmt_resources/providers.rb +47 -62
- data/lib/generated/azure_mgmt_resources/resource_groups.rb +94 -124
- data/lib/generated/azure_mgmt_resources/resource_management_client.rb +55 -4
- data/lib/generated/azure_mgmt_resources/resources.rb +65 -86
- data/lib/generated/azure_mgmt_resources/tags.rb +56 -74
- data/lib/generated/azure_mgmt_resources/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1361ebfc3b05a7f35623ae6501bc996e550edc1
|
4
|
+
data.tar.gz: 0feef15e5aeefd3db070ee20b7e317b08ab8e19f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c387cb58430910affdb9e281574b46aa9b0cd333ddcbd104f4fe2bcd9d3375626a6655d68eb18904d91acb5ff4ac0a67b6df4488d49dbe9b63c97772403f646
|
7
|
+
data.tar.gz: 5f8152a551e0c64c6a9fd15e1b42d4bd346736f2ab422c32ef2097176327a9e01db64259504dd1935affb7b0e3b0883fca8087050be88feccc2025897047cb13
|
@@ -81,30 +81,27 @@ module Azure::ARM::Resources
|
|
81
81
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
82
82
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
83
83
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}'
|
84
|
+
|
85
|
+
request_url = @base_url || @client.base_url
|
86
|
+
|
84
87
|
options = {
|
85
88
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
86
89
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'operationId' => operation_id,'subscriptionId' => @client.subscription_id},
|
87
90
|
query_params: {'api-version' => @client.api_version},
|
88
|
-
headers: request_headers.merge(custom_headers || {})
|
91
|
+
headers: request_headers.merge(custom_headers || {}),
|
92
|
+
base_url: request_url
|
89
93
|
}
|
94
|
+
promise = @client.make_request_async(:get, path_template, options)
|
90
95
|
|
91
|
-
|
92
|
-
|
93
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
94
|
-
promise = request.run_promise do |req|
|
95
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
96
|
-
end
|
97
|
-
|
98
|
-
promise = promise.then do |http_response|
|
96
|
+
promise = promise.then do |result|
|
97
|
+
http_response = result.response
|
99
98
|
status_code = http_response.status
|
100
99
|
response_content = http_response.body
|
101
100
|
unless status_code == 200
|
102
101
|
error_model = JSON.load(response_content)
|
103
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
102
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
104
103
|
end
|
105
104
|
|
106
|
-
# Create Result
|
107
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
108
105
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
109
106
|
# Deserialize Response
|
110
107
|
if status_code == 200
|
@@ -140,8 +137,8 @@ module Azure::ARM::Resources
|
|
140
137
|
response = list_async(resource_group_name, deployment_name, top, custom_headers).value!
|
141
138
|
unless response.nil?
|
142
139
|
page = response.body
|
143
|
-
page.next_method = Proc.new do |
|
144
|
-
list_next_async(
|
140
|
+
page.next_method = Proc.new do |next_page_link|
|
141
|
+
list_next_async(next_page_link, custom_headers)
|
145
142
|
end
|
146
143
|
page
|
147
144
|
end
|
@@ -205,30 +202,27 @@ module Azure::ARM::Resources
|
|
205
202
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
206
203
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
207
204
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations'
|
205
|
+
|
206
|
+
request_url = @base_url || @client.base_url
|
207
|
+
|
208
208
|
options = {
|
209
209
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
210
210
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
211
211
|
query_params: {'$top' => top,'api-version' => @client.api_version},
|
212
|
-
headers: request_headers.merge(custom_headers || {})
|
212
|
+
headers: request_headers.merge(custom_headers || {}),
|
213
|
+
base_url: request_url
|
213
214
|
}
|
215
|
+
promise = @client.make_request_async(:get, path_template, options)
|
214
216
|
|
215
|
-
|
216
|
-
|
217
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
218
|
-
promise = request.run_promise do |req|
|
219
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
220
|
-
end
|
221
|
-
|
222
|
-
promise = promise.then do |http_response|
|
217
|
+
promise = promise.then do |result|
|
218
|
+
http_response = result.response
|
223
219
|
status_code = http_response.status
|
224
220
|
response_content = http_response.body
|
225
221
|
unless status_code == 200
|
226
222
|
error_model = JSON.load(response_content)
|
227
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
223
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
228
224
|
end
|
229
225
|
|
230
|
-
# Create Result
|
231
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
232
226
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
233
227
|
# Deserialize Response
|
234
228
|
if status_code == 200
|
@@ -296,29 +290,26 @@ module Azure::ARM::Resources
|
|
296
290
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
297
291
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
298
292
|
path_template = '{nextLink}'
|
293
|
+
|
294
|
+
request_url = @base_url || @client.base_url
|
295
|
+
|
299
296
|
options = {
|
300
297
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
301
298
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
302
|
-
headers: request_headers.merge(custom_headers || {})
|
299
|
+
headers: request_headers.merge(custom_headers || {}),
|
300
|
+
base_url: request_url
|
303
301
|
}
|
302
|
+
promise = @client.make_request_async(:get, path_template, options)
|
304
303
|
|
305
|
-
|
306
|
-
|
307
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
308
|
-
promise = request.run_promise do |req|
|
309
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
310
|
-
end
|
311
|
-
|
312
|
-
promise = promise.then do |http_response|
|
304
|
+
promise = promise.then do |result|
|
305
|
+
http_response = result.response
|
313
306
|
status_code = http_response.status
|
314
307
|
response_content = http_response.body
|
315
308
|
unless status_code == 200
|
316
309
|
error_model = JSON.load(response_content)
|
317
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
310
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
318
311
|
end
|
319
312
|
|
320
|
-
# Create Result
|
321
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
322
313
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
323
314
|
# Deserialize Response
|
324
315
|
if status_code == 200
|
@@ -116,30 +116,27 @@ module Azure::ARM::Resources
|
|
116
116
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
117
117
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
118
118
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
119
|
+
|
120
|
+
request_url = @base_url || @client.base_url
|
121
|
+
|
119
122
|
options = {
|
120
123
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
121
124
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
122
125
|
query_params: {'api-version' => @client.api_version},
|
123
|
-
headers: request_headers.merge(custom_headers || {})
|
126
|
+
headers: request_headers.merge(custom_headers || {}),
|
127
|
+
base_url: request_url
|
124
128
|
}
|
129
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
125
130
|
|
126
|
-
|
127
|
-
|
128
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
129
|
-
promise = request.run_promise do |req|
|
130
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
131
|
-
end
|
132
|
-
|
133
|
-
promise = promise.then do |http_response|
|
131
|
+
promise = promise.then do |result|
|
132
|
+
http_response = result.response
|
134
133
|
status_code = http_response.status
|
135
134
|
response_content = http_response.body
|
136
135
|
unless status_code == 202 || status_code == 204
|
137
136
|
error_model = JSON.load(response_content)
|
138
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
137
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
139
138
|
end
|
140
139
|
|
141
|
-
# Create Result
|
142
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
143
140
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
144
141
|
|
145
142
|
result
|
@@ -203,30 +200,27 @@ module Azure::ARM::Resources
|
|
203
200
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
204
201
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
205
202
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
203
|
+
|
204
|
+
request_url = @base_url || @client.base_url
|
205
|
+
|
206
206
|
options = {
|
207
207
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
208
208
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
209
209
|
query_params: {'api-version' => @client.api_version},
|
210
|
-
headers: request_headers.merge(custom_headers || {})
|
210
|
+
headers: request_headers.merge(custom_headers || {}),
|
211
|
+
base_url: request_url
|
211
212
|
}
|
213
|
+
promise = @client.make_request_async(:head, path_template, options)
|
212
214
|
|
213
|
-
|
214
|
-
|
215
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :head, options)
|
216
|
-
promise = request.run_promise do |req|
|
217
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
218
|
-
end
|
219
|
-
|
220
|
-
promise = promise.then do |http_response|
|
215
|
+
promise = promise.then do |result|
|
216
|
+
http_response = result.response
|
221
217
|
status_code = http_response.status
|
222
218
|
response_content = http_response.body
|
223
219
|
unless status_code == 204 || status_code == 404
|
224
220
|
error_model = JSON.load(response_content)
|
225
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
221
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
226
222
|
end
|
227
223
|
|
228
|
-
# Create Result
|
229
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
230
224
|
result.body = (status_code == 204)
|
231
225
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
232
226
|
|
@@ -354,31 +348,28 @@ module Azure::ARM::Resources
|
|
354
348
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
355
349
|
|
356
350
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
351
|
+
|
352
|
+
request_url = @base_url || @client.base_url
|
353
|
+
|
357
354
|
options = {
|
358
355
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
359
356
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
360
357
|
query_params: {'api-version' => @client.api_version},
|
361
358
|
body: request_content,
|
362
|
-
headers: request_headers.merge(custom_headers || {})
|
359
|
+
headers: request_headers.merge(custom_headers || {}),
|
360
|
+
base_url: request_url
|
363
361
|
}
|
362
|
+
promise = @client.make_request_async(:put, path_template, options)
|
364
363
|
|
365
|
-
|
366
|
-
|
367
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
368
|
-
promise = request.run_promise do |req|
|
369
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
370
|
-
end
|
371
|
-
|
372
|
-
promise = promise.then do |http_response|
|
364
|
+
promise = promise.then do |result|
|
365
|
+
http_response = result.response
|
373
366
|
status_code = http_response.status
|
374
367
|
response_content = http_response.body
|
375
368
|
unless status_code == 200 || status_code == 201
|
376
369
|
error_model = JSON.load(response_content)
|
377
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
370
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
378
371
|
end
|
379
372
|
|
380
|
-
# Create Result
|
381
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
382
373
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
383
374
|
# Deserialize Response
|
384
375
|
if status_code == 200
|
@@ -462,30 +453,27 @@ module Azure::ARM::Resources
|
|
462
453
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
463
454
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
464
455
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}'
|
456
|
+
|
457
|
+
request_url = @base_url || @client.base_url
|
458
|
+
|
465
459
|
options = {
|
466
460
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
467
461
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
468
462
|
query_params: {'api-version' => @client.api_version},
|
469
|
-
headers: request_headers.merge(custom_headers || {})
|
463
|
+
headers: request_headers.merge(custom_headers || {}),
|
464
|
+
base_url: request_url
|
470
465
|
}
|
466
|
+
promise = @client.make_request_async(:get, path_template, options)
|
471
467
|
|
472
|
-
|
473
|
-
|
474
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
475
|
-
promise = request.run_promise do |req|
|
476
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
477
|
-
end
|
478
|
-
|
479
|
-
promise = promise.then do |http_response|
|
468
|
+
promise = promise.then do |result|
|
469
|
+
http_response = result.response
|
480
470
|
status_code = http_response.status
|
481
471
|
response_content = http_response.body
|
482
472
|
unless status_code == 200
|
483
473
|
error_model = JSON.load(response_content)
|
484
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
474
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
485
475
|
end
|
486
476
|
|
487
|
-
# Create Result
|
488
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
489
477
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
490
478
|
# Deserialize Response
|
491
479
|
if status_code == 200
|
@@ -558,30 +546,27 @@ module Azure::ARM::Resources
|
|
558
546
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
559
547
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
560
548
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/cancel'
|
549
|
+
|
550
|
+
request_url = @base_url || @client.base_url
|
551
|
+
|
561
552
|
options = {
|
562
553
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
563
554
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
564
555
|
query_params: {'api-version' => @client.api_version},
|
565
|
-
headers: request_headers.merge(custom_headers || {})
|
556
|
+
headers: request_headers.merge(custom_headers || {}),
|
557
|
+
base_url: request_url
|
566
558
|
}
|
559
|
+
promise = @client.make_request_async(:post, path_template, options)
|
567
560
|
|
568
|
-
|
569
|
-
|
570
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
571
|
-
promise = request.run_promise do |req|
|
572
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
573
|
-
end
|
574
|
-
|
575
|
-
promise = promise.then do |http_response|
|
561
|
+
promise = promise.then do |result|
|
562
|
+
http_response = result.response
|
576
563
|
status_code = http_response.status
|
577
564
|
response_content = http_response.body
|
578
565
|
unless status_code == 204
|
579
566
|
error_model = JSON.load(response_content)
|
580
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
567
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
581
568
|
end
|
582
569
|
|
583
|
-
# Create Result
|
584
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
585
570
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
586
571
|
|
587
572
|
result
|
@@ -657,31 +642,28 @@ module Azure::ARM::Resources
|
|
657
642
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
658
643
|
|
659
644
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/validate'
|
645
|
+
|
646
|
+
request_url = @base_url || @client.base_url
|
647
|
+
|
660
648
|
options = {
|
661
649
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
662
650
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
663
651
|
query_params: {'api-version' => @client.api_version},
|
664
652
|
body: request_content,
|
665
|
-
headers: request_headers.merge(custom_headers || {})
|
653
|
+
headers: request_headers.merge(custom_headers || {}),
|
654
|
+
base_url: request_url
|
666
655
|
}
|
656
|
+
promise = @client.make_request_async(:post, path_template, options)
|
667
657
|
|
668
|
-
|
669
|
-
|
670
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
671
|
-
promise = request.run_promise do |req|
|
672
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
673
|
-
end
|
674
|
-
|
675
|
-
promise = promise.then do |http_response|
|
658
|
+
promise = promise.then do |result|
|
659
|
+
http_response = result.response
|
676
660
|
status_code = http_response.status
|
677
661
|
response_content = http_response.body
|
678
662
|
unless status_code == 200 || status_code == 400
|
679
663
|
error_model = JSON.load(response_content)
|
680
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
664
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
681
665
|
end
|
682
666
|
|
683
|
-
# Create Result
|
684
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
685
667
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
686
668
|
# Deserialize Response
|
687
669
|
if status_code == 200
|
@@ -765,30 +747,27 @@ module Azure::ARM::Resources
|
|
765
747
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
766
748
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
767
749
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/{deploymentName}/exportTemplate'
|
750
|
+
|
751
|
+
request_url = @base_url || @client.base_url
|
752
|
+
|
768
753
|
options = {
|
769
754
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
770
755
|
path_params: {'resourceGroupName' => resource_group_name,'deploymentName' => deployment_name,'subscriptionId' => @client.subscription_id},
|
771
756
|
query_params: {'api-version' => @client.api_version},
|
772
|
-
headers: request_headers.merge(custom_headers || {})
|
757
|
+
headers: request_headers.merge(custom_headers || {}),
|
758
|
+
base_url: request_url
|
773
759
|
}
|
760
|
+
promise = @client.make_request_async(:post, path_template, options)
|
774
761
|
|
775
|
-
|
776
|
-
|
777
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
778
|
-
promise = request.run_promise do |req|
|
779
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
780
|
-
end
|
781
|
-
|
782
|
-
promise = promise.then do |http_response|
|
762
|
+
promise = promise.then do |result|
|
763
|
+
http_response = result.response
|
783
764
|
status_code = http_response.status
|
784
765
|
response_content = http_response.body
|
785
766
|
unless status_code == 200
|
786
767
|
error_model = JSON.load(response_content)
|
787
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
768
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
788
769
|
end
|
789
770
|
|
790
|
-
# Create Result
|
791
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
792
771
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
793
772
|
# Deserialize Response
|
794
773
|
if status_code == 200
|
@@ -825,8 +804,8 @@ module Azure::ARM::Resources
|
|
825
804
|
response = list_async(resource_group_name, filter, top, custom_headers).value!
|
826
805
|
unless response.nil?
|
827
806
|
page = response.body
|
828
|
-
page.next_method = Proc.new do |
|
829
|
-
list_next_async(
|
807
|
+
page.next_method = Proc.new do |next_page_link|
|
808
|
+
list_next_async(next_page_link, custom_headers)
|
830
809
|
end
|
831
810
|
page
|
832
811
|
end
|
@@ -892,30 +871,27 @@ module Azure::ARM::Resources
|
|
892
871
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
893
872
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
894
873
|
path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/'
|
874
|
+
|
875
|
+
request_url = @base_url || @client.base_url
|
876
|
+
|
895
877
|
options = {
|
896
878
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
897
879
|
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
898
880
|
query_params: {'$filter' => filter,'$top' => top,'api-version' => @client.api_version},
|
899
|
-
headers: request_headers.merge(custom_headers || {})
|
881
|
+
headers: request_headers.merge(custom_headers || {}),
|
882
|
+
base_url: request_url
|
900
883
|
}
|
884
|
+
promise = @client.make_request_async(:get, path_template, options)
|
901
885
|
|
902
|
-
|
903
|
-
|
904
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
905
|
-
promise = request.run_promise do |req|
|
906
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
907
|
-
end
|
908
|
-
|
909
|
-
promise = promise.then do |http_response|
|
886
|
+
promise = promise.then do |result|
|
887
|
+
http_response = result.response
|
910
888
|
status_code = http_response.status
|
911
889
|
response_content = http_response.body
|
912
890
|
unless status_code == 200
|
913
891
|
error_model = JSON.load(response_content)
|
914
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
892
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
915
893
|
end
|
916
894
|
|
917
|
-
# Create Result
|
918
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
919
895
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
920
896
|
# Deserialize Response
|
921
897
|
if status_code == 200
|
@@ -983,29 +959,26 @@ module Azure::ARM::Resources
|
|
983
959
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
984
960
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
985
961
|
path_template = '{nextLink}'
|
962
|
+
|
963
|
+
request_url = @base_url || @client.base_url
|
964
|
+
|
986
965
|
options = {
|
987
966
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
988
967
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
989
|
-
headers: request_headers.merge(custom_headers || {})
|
968
|
+
headers: request_headers.merge(custom_headers || {}),
|
969
|
+
base_url: request_url
|
990
970
|
}
|
971
|
+
promise = @client.make_request_async(:get, path_template, options)
|
991
972
|
|
992
|
-
|
993
|
-
|
994
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
995
|
-
promise = request.run_promise do |req|
|
996
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
997
|
-
end
|
998
|
-
|
999
|
-
promise = promise.then do |http_response|
|
973
|
+
promise = promise.then do |result|
|
974
|
+
http_response = result.response
|
1000
975
|
status_code = http_response.status
|
1001
976
|
response_content = http_response.body
|
1002
977
|
unless status_code == 200
|
1003
978
|
error_model = JSON.load(response_content)
|
1004
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
979
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1005
980
|
end
|
1006
981
|
|
1007
|
-
# Create Result
|
1008
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1009
982
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1010
983
|
# Deserialize Response
|
1011
984
|
if status_code == 200
|