azure_mgmt_devtestlabs 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_devtestlabs/artifact_operations.rb +38 -50
- data/lib/generated/azure_mgmt_devtestlabs/artifact_source_operations.rb +56 -74
- data/lib/generated/azure_mgmt_devtestlabs/cost_operations.rb +9 -12
- data/lib/generated/azure_mgmt_devtestlabs/custom_image_operations.rb +47 -62
- data/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +55 -4
- data/lib/generated/azure_mgmt_devtestlabs/formula_operations.rb +47 -62
- data/lib/generated/azure_mgmt_devtestlabs/gallery_image_operations.rb +20 -26
- data/lib/generated/azure_mgmt_devtestlabs/lab_operations.rb +114 -150
- data/lib/generated/azure_mgmt_devtestlabs/policy_operations.rb +56 -74
- data/lib/generated/azure_mgmt_devtestlabs/policy_set.rb +9 -12
- data/lib/generated/azure_mgmt_devtestlabs/schedule_operations.rb +65 -86
- data/lib/generated/azure_mgmt_devtestlabs/version.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/virtual_machine.rb +83 -110
- data/lib/generated/azure_mgmt_devtestlabs/virtual_network_operations.rb +56 -74
- metadata +5 -5
@@ -43,8 +43,8 @@ module Azure::ARM::DevTestLabs
|
|
43
43
|
response = list_async(resource_group_name, lab_name, policy_set_name, filter, top, order_by, custom_headers).value!
|
44
44
|
unless response.nil?
|
45
45
|
page = response.body
|
46
|
-
page.next_method = Proc.new do |
|
47
|
-
list_next_async(
|
46
|
+
page.next_method = Proc.new do |next_page_link|
|
47
|
+
list_next_async(next_page_link, custom_headers)
|
48
48
|
end
|
49
49
|
page
|
50
50
|
end
|
@@ -121,30 +121,27 @@ module Azure::ARM::DevTestLabs
|
|
121
121
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
122
122
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
123
123
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies'
|
124
|
+
|
125
|
+
request_url = @base_url || @client.base_url
|
126
|
+
|
124
127
|
options = {
|
125
128
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
126
129
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'policySetName' => policy_set_name},
|
127
130
|
query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'api-version' => @client.api_version},
|
128
|
-
headers: request_headers.merge(custom_headers || {})
|
131
|
+
headers: request_headers.merge(custom_headers || {}),
|
132
|
+
base_url: request_url
|
129
133
|
}
|
134
|
+
promise = @client.make_request_async(:get, path_template, options)
|
130
135
|
|
131
|
-
|
132
|
-
|
133
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
134
|
-
promise = request.run_promise do |req|
|
135
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
136
|
-
end
|
137
|
-
|
138
|
-
promise = promise.then do |http_response|
|
136
|
+
promise = promise.then do |result|
|
137
|
+
http_response = result.response
|
139
138
|
status_code = http_response.status
|
140
139
|
response_content = http_response.body
|
141
140
|
unless status_code == 200
|
142
141
|
error_model = JSON.load(response_content)
|
143
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
142
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
144
143
|
end
|
145
144
|
|
146
|
-
# Create Result
|
147
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
148
145
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
149
146
|
# Deserialize Response
|
150
147
|
if status_code == 200
|
@@ -223,30 +220,27 @@ module Azure::ARM::DevTestLabs
|
|
223
220
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
224
221
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
225
222
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'
|
223
|
+
|
224
|
+
request_url = @base_url || @client.base_url
|
225
|
+
|
226
226
|
options = {
|
227
227
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
228
228
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'policySetName' => policy_set_name,'name' => name},
|
229
229
|
query_params: {'api-version' => @client.api_version},
|
230
|
-
headers: request_headers.merge(custom_headers || {})
|
230
|
+
headers: request_headers.merge(custom_headers || {}),
|
231
|
+
base_url: request_url
|
231
232
|
}
|
233
|
+
promise = @client.make_request_async(:get, path_template, options)
|
232
234
|
|
233
|
-
|
234
|
-
|
235
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
236
|
-
promise = request.run_promise do |req|
|
237
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
238
|
-
end
|
239
|
-
|
240
|
-
promise = promise.then do |http_response|
|
235
|
+
promise = promise.then do |result|
|
236
|
+
http_response = result.response
|
241
237
|
status_code = http_response.status
|
242
238
|
response_content = http_response.body
|
243
239
|
unless status_code == 200
|
244
240
|
error_model = JSON.load(response_content)
|
245
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
241
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
246
242
|
end
|
247
243
|
|
248
|
-
# Create Result
|
249
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
250
244
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
251
245
|
# Deserialize Response
|
252
246
|
if status_code == 200
|
@@ -337,31 +331,28 @@ module Azure::ARM::DevTestLabs
|
|
337
331
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
338
332
|
|
339
333
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'
|
334
|
+
|
335
|
+
request_url = @base_url || @client.base_url
|
336
|
+
|
340
337
|
options = {
|
341
338
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
342
339
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'policySetName' => policy_set_name,'name' => name},
|
343
340
|
query_params: {'api-version' => @client.api_version},
|
344
341
|
body: request_content,
|
345
|
-
headers: request_headers.merge(custom_headers || {})
|
342
|
+
headers: request_headers.merge(custom_headers || {}),
|
343
|
+
base_url: request_url
|
346
344
|
}
|
345
|
+
promise = @client.make_request_async(:put, path_template, options)
|
347
346
|
|
348
|
-
|
349
|
-
|
350
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
351
|
-
promise = request.run_promise do |req|
|
352
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
353
|
-
end
|
354
|
-
|
355
|
-
promise = promise.then do |http_response|
|
347
|
+
promise = promise.then do |result|
|
348
|
+
http_response = result.response
|
356
349
|
status_code = http_response.status
|
357
350
|
response_content = http_response.body
|
358
351
|
unless status_code == 200 || status_code == 201
|
359
352
|
error_model = JSON.load(response_content)
|
360
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
353
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
361
354
|
end
|
362
355
|
|
363
|
-
# Create Result
|
364
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
365
356
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
366
357
|
# Deserialize Response
|
367
358
|
if status_code == 200
|
@@ -449,30 +440,27 @@ module Azure::ARM::DevTestLabs
|
|
449
440
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
450
441
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
451
442
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'
|
443
|
+
|
444
|
+
request_url = @base_url || @client.base_url
|
445
|
+
|
452
446
|
options = {
|
453
447
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
454
448
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'policySetName' => policy_set_name,'name' => name},
|
455
449
|
query_params: {'api-version' => @client.api_version},
|
456
|
-
headers: request_headers.merge(custom_headers || {})
|
450
|
+
headers: request_headers.merge(custom_headers || {}),
|
451
|
+
base_url: request_url
|
457
452
|
}
|
453
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
458
454
|
|
459
|
-
|
460
|
-
|
461
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
462
|
-
promise = request.run_promise do |req|
|
463
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
464
|
-
end
|
465
|
-
|
466
|
-
promise = promise.then do |http_response|
|
455
|
+
promise = promise.then do |result|
|
456
|
+
http_response = result.response
|
467
457
|
status_code = http_response.status
|
468
458
|
response_content = http_response.body
|
469
459
|
unless status_code == 200 || status_code == 204
|
470
460
|
error_model = JSON.load(response_content)
|
471
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
461
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
472
462
|
end
|
473
463
|
|
474
|
-
# Create Result
|
475
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
476
464
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
477
465
|
|
478
466
|
result
|
@@ -553,31 +541,28 @@ module Azure::ARM::DevTestLabs
|
|
553
541
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
554
542
|
|
555
543
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{policySetName}/policies/{name}'
|
544
|
+
|
545
|
+
request_url = @base_url || @client.base_url
|
546
|
+
|
556
547
|
options = {
|
557
548
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
558
549
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'policySetName' => policy_set_name,'name' => name},
|
559
550
|
query_params: {'api-version' => @client.api_version},
|
560
551
|
body: request_content,
|
561
|
-
headers: request_headers.merge(custom_headers || {})
|
552
|
+
headers: request_headers.merge(custom_headers || {}),
|
553
|
+
base_url: request_url
|
562
554
|
}
|
555
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
563
556
|
|
564
|
-
|
565
|
-
|
566
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
567
|
-
promise = request.run_promise do |req|
|
568
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
569
|
-
end
|
570
|
-
|
571
|
-
promise = promise.then do |http_response|
|
557
|
+
promise = promise.then do |result|
|
558
|
+
http_response = result.response
|
572
559
|
status_code = http_response.status
|
573
560
|
response_content = http_response.body
|
574
561
|
unless status_code == 200
|
575
562
|
error_model = JSON.load(response_content)
|
576
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
563
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
577
564
|
end
|
578
565
|
|
579
|
-
# Create Result
|
580
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
581
566
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
582
567
|
# Deserialize Response
|
583
568
|
if status_code == 200
|
@@ -645,29 +630,26 @@ module Azure::ARM::DevTestLabs
|
|
645
630
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
646
631
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
647
632
|
path_template = '{nextLink}'
|
633
|
+
|
634
|
+
request_url = @base_url || @client.base_url
|
635
|
+
|
648
636
|
options = {
|
649
637
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
650
638
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
651
|
-
headers: request_headers.merge(custom_headers || {})
|
639
|
+
headers: request_headers.merge(custom_headers || {}),
|
640
|
+
base_url: request_url
|
652
641
|
}
|
642
|
+
promise = @client.make_request_async(:get, path_template, options)
|
653
643
|
|
654
|
-
|
655
|
-
|
656
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
657
|
-
promise = request.run_promise do |req|
|
658
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
659
|
-
end
|
660
|
-
|
661
|
-
promise = promise.then do |http_response|
|
644
|
+
promise = promise.then do |result|
|
645
|
+
http_response = result.response
|
662
646
|
status_code = http_response.status
|
663
647
|
response_content = http_response.body
|
664
648
|
unless status_code == 200
|
665
649
|
error_model = JSON.load(response_content)
|
666
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
650
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
667
651
|
end
|
668
652
|
|
669
|
-
# Create Result
|
670
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
671
653
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
672
654
|
# Deserialize Response
|
673
655
|
if status_code == 200
|
@@ -90,31 +90,28 @@ module Azure::ARM::DevTestLabs
|
|
90
90
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
91
91
|
|
92
92
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/policysets/{name}/evaluatePolicies'
|
93
|
+
|
94
|
+
request_url = @base_url || @client.base_url
|
95
|
+
|
93
96
|
options = {
|
94
97
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
95
98
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
96
99
|
query_params: {'api-version' => @client.api_version},
|
97
100
|
body: request_content,
|
98
|
-
headers: request_headers.merge(custom_headers || {})
|
101
|
+
headers: request_headers.merge(custom_headers || {}),
|
102
|
+
base_url: request_url
|
99
103
|
}
|
104
|
+
promise = @client.make_request_async(:post, path_template, options)
|
100
105
|
|
101
|
-
|
102
|
-
|
103
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
104
|
-
promise = request.run_promise do |req|
|
105
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
106
|
-
end
|
107
|
-
|
108
|
-
promise = promise.then do |http_response|
|
106
|
+
promise = promise.then do |result|
|
107
|
+
http_response = result.response
|
109
108
|
status_code = http_response.status
|
110
109
|
response_content = http_response.body
|
111
110
|
unless status_code == 200
|
112
111
|
error_model = JSON.load(response_content)
|
113
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
112
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
114
113
|
end
|
115
114
|
|
116
|
-
# Create Result
|
117
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
118
115
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
119
116
|
# Deserialize Response
|
120
117
|
if status_code == 200
|
@@ -42,8 +42,8 @@ module Azure::ARM::DevTestLabs
|
|
42
42
|
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
43
43
|
unless response.nil?
|
44
44
|
page = response.body
|
45
|
-
page.next_method = Proc.new do |
|
46
|
-
list_next_async(
|
45
|
+
page.next_method = Proc.new do |next_page_link|
|
46
|
+
list_next_async(next_page_link, custom_headers)
|
47
47
|
end
|
48
48
|
page
|
49
49
|
end
|
@@ -116,30 +116,27 @@ module Azure::ARM::DevTestLabs
|
|
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.DevTestLab/labs/{labName}/schedules'
|
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: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name},
|
122
125
|
query_params: {'$filter' => filter,'$top' => top,'$orderBy' => order_by,'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(:get, path_template, options)
|
125
130
|
|
126
|
-
|
127
|
-
|
128
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, 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 == 200
|
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
|
# Deserialize Response
|
145
142
|
if status_code == 200
|
@@ -214,30 +211,27 @@ module Azure::ARM::DevTestLabs
|
|
214
211
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
215
212
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
216
213
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
214
|
+
|
215
|
+
request_url = @base_url || @client.base_url
|
216
|
+
|
217
217
|
options = {
|
218
218
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
219
219
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
220
220
|
query_params: {'api-version' => @client.api_version},
|
221
|
-
headers: request_headers.merge(custom_headers || {})
|
221
|
+
headers: request_headers.merge(custom_headers || {}),
|
222
|
+
base_url: request_url
|
222
223
|
}
|
224
|
+
promise = @client.make_request_async(:get, path_template, options)
|
223
225
|
|
224
|
-
|
225
|
-
|
226
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
227
|
-
promise = request.run_promise do |req|
|
228
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
229
|
-
end
|
230
|
-
|
231
|
-
promise = promise.then do |http_response|
|
226
|
+
promise = promise.then do |result|
|
227
|
+
http_response = result.response
|
232
228
|
status_code = http_response.status
|
233
229
|
response_content = http_response.body
|
234
230
|
unless status_code == 200
|
235
231
|
error_model = JSON.load(response_content)
|
236
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
232
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
237
233
|
end
|
238
234
|
|
239
|
-
# Create Result
|
240
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
241
235
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
242
236
|
# Deserialize Response
|
243
237
|
if status_code == 200
|
@@ -324,31 +318,28 @@ module Azure::ARM::DevTestLabs
|
|
324
318
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
325
319
|
|
326
320
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
321
|
+
|
322
|
+
request_url = @base_url || @client.base_url
|
323
|
+
|
327
324
|
options = {
|
328
325
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
329
326
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
330
327
|
query_params: {'api-version' => @client.api_version},
|
331
328
|
body: request_content,
|
332
|
-
headers: request_headers.merge(custom_headers || {})
|
329
|
+
headers: request_headers.merge(custom_headers || {}),
|
330
|
+
base_url: request_url
|
333
331
|
}
|
332
|
+
promise = @client.make_request_async(:put, path_template, options)
|
334
333
|
|
335
|
-
|
336
|
-
|
337
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
|
338
|
-
promise = request.run_promise do |req|
|
339
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
340
|
-
end
|
341
|
-
|
342
|
-
promise = promise.then do |http_response|
|
334
|
+
promise = promise.then do |result|
|
335
|
+
http_response = result.response
|
343
336
|
status_code = http_response.status
|
344
337
|
response_content = http_response.body
|
345
338
|
unless status_code == 200 || status_code == 201
|
346
339
|
error_model = JSON.load(response_content)
|
347
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
340
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
348
341
|
end
|
349
342
|
|
350
|
-
# Create Result
|
351
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
352
343
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
353
344
|
# Deserialize Response
|
354
345
|
if status_code == 200
|
@@ -432,30 +423,27 @@ module Azure::ARM::DevTestLabs
|
|
432
423
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
433
424
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
434
425
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
426
|
+
|
427
|
+
request_url = @base_url || @client.base_url
|
428
|
+
|
435
429
|
options = {
|
436
430
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
437
431
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
438
432
|
query_params: {'api-version' => @client.api_version},
|
439
|
-
headers: request_headers.merge(custom_headers || {})
|
433
|
+
headers: request_headers.merge(custom_headers || {}),
|
434
|
+
base_url: request_url
|
440
435
|
}
|
436
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
441
437
|
|
442
|
-
|
443
|
-
|
444
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
|
445
|
-
promise = request.run_promise do |req|
|
446
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
447
|
-
end
|
448
|
-
|
449
|
-
promise = promise.then do |http_response|
|
438
|
+
promise = promise.then do |result|
|
439
|
+
http_response = result.response
|
450
440
|
status_code = http_response.status
|
451
441
|
response_content = http_response.body
|
452
442
|
unless status_code == 200 || status_code == 204
|
453
443
|
error_model = JSON.load(response_content)
|
454
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
444
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
455
445
|
end
|
456
446
|
|
457
|
-
# Create Result
|
458
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
459
447
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
460
448
|
|
461
449
|
result
|
@@ -532,31 +520,28 @@ module Azure::ARM::DevTestLabs
|
|
532
520
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
533
521
|
|
534
522
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
523
|
+
|
524
|
+
request_url = @base_url || @client.base_url
|
525
|
+
|
535
526
|
options = {
|
536
527
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
537
528
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
538
529
|
query_params: {'api-version' => @client.api_version},
|
539
530
|
body: request_content,
|
540
|
-
headers: request_headers.merge(custom_headers || {})
|
531
|
+
headers: request_headers.merge(custom_headers || {}),
|
532
|
+
base_url: request_url
|
541
533
|
}
|
534
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
542
535
|
|
543
|
-
|
544
|
-
|
545
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
|
546
|
-
promise = request.run_promise do |req|
|
547
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
548
|
-
end
|
549
|
-
|
550
|
-
promise = promise.then do |http_response|
|
536
|
+
promise = promise.then do |result|
|
537
|
+
http_response = result.response
|
551
538
|
status_code = http_response.status
|
552
539
|
response_content = http_response.body
|
553
540
|
unless status_code == 200
|
554
541
|
error_model = JSON.load(response_content)
|
555
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
542
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
556
543
|
end
|
557
544
|
|
558
|
-
# Create Result
|
559
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
560
545
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
561
546
|
# Deserialize Response
|
562
547
|
if status_code == 200
|
@@ -670,30 +655,27 @@ module Azure::ARM::DevTestLabs
|
|
670
655
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
671
656
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
672
657
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute'
|
658
|
+
|
659
|
+
request_url = @base_url || @client.base_url
|
660
|
+
|
673
661
|
options = {
|
674
662
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
675
663
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
676
664
|
query_params: {'api-version' => @client.api_version},
|
677
|
-
headers: request_headers.merge(custom_headers || {})
|
665
|
+
headers: request_headers.merge(custom_headers || {}),
|
666
|
+
base_url: request_url
|
678
667
|
}
|
668
|
+
promise = @client.make_request_async(:post, path_template, options)
|
679
669
|
|
680
|
-
|
681
|
-
|
682
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
683
|
-
promise = request.run_promise do |req|
|
684
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
685
|
-
end
|
686
|
-
|
687
|
-
promise = promise.then do |http_response|
|
670
|
+
promise = promise.then do |result|
|
671
|
+
http_response = result.response
|
688
672
|
status_code = http_response.status
|
689
673
|
response_content = http_response.body
|
690
674
|
unless status_code == 200 || status_code == 202
|
691
675
|
error_model = JSON.load(response_content)
|
692
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
676
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
693
677
|
end
|
694
678
|
|
695
|
-
# Create Result
|
696
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
697
679
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
698
680
|
|
699
681
|
result
|
@@ -751,29 +733,26 @@ module Azure::ARM::DevTestLabs
|
|
751
733
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
752
734
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
753
735
|
path_template = '{nextLink}'
|
736
|
+
|
737
|
+
request_url = @base_url || @client.base_url
|
738
|
+
|
754
739
|
options = {
|
755
740
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
756
741
|
skip_encoding_path_params: {'nextLink' => next_page_link},
|
757
|
-
headers: request_headers.merge(custom_headers || {})
|
742
|
+
headers: request_headers.merge(custom_headers || {}),
|
743
|
+
base_url: request_url
|
758
744
|
}
|
745
|
+
promise = @client.make_request_async(:get, path_template, options)
|
759
746
|
|
760
|
-
|
761
|
-
|
762
|
-
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
763
|
-
promise = request.run_promise do |req|
|
764
|
-
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
765
|
-
end
|
766
|
-
|
767
|
-
promise = promise.then do |http_response|
|
747
|
+
promise = promise.then do |result|
|
748
|
+
http_response = result.response
|
768
749
|
status_code = http_response.status
|
769
750
|
response_content = http_response.body
|
770
751
|
unless status_code == 200
|
771
752
|
error_model = JSON.load(response_content)
|
772
|
-
fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
|
753
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
773
754
|
end
|
774
755
|
|
775
|
-
# Create Result
|
776
|
-
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
777
756
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
778
757
|
# Deserialize Response
|
779
758
|
if status_code == 200
|