azure_mgmt_devtestlabs 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_devtestlabs.rb +25 -25
- data/lib/generated/azure_mgmt_devtestlabs/artifact_operations.rb +42 -42
- data/lib/generated/azure_mgmt_devtestlabs/artifact_source_operations.rb +41 -41
- data/lib/generated/azure_mgmt_devtestlabs/cost_operations.rb +2 -2
- data/lib/generated/azure_mgmt_devtestlabs/custom_image_operations.rb +81 -81
- data/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +14 -1
- data/lib/generated/azure_mgmt_devtestlabs/formula_operations.rb +100 -100
- data/lib/generated/azure_mgmt_devtestlabs/gallery_image_operations.rb +41 -41
- data/lib/generated/azure_mgmt_devtestlabs/lab_operations.rb +288 -288
- data/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/cost.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/cost_per_day_properties.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/formula.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +3 -3
- data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/lab.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_storage_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +3 -3
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/resource_cost_properties.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +6 -6
- data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification_properties.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification_state.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/policy_operations.rb +42 -42
- data/lib/generated/azure_mgmt_devtestlabs/policy_set.rb +2 -2
- data/lib/generated/azure_mgmt_devtestlabs/schedule_operations.rb +41 -41
- data/lib/generated/azure_mgmt_devtestlabs/version.rb +2 -2
- data/lib/generated/azure_mgmt_devtestlabs/virtual_machine.rb +224 -224
- data/lib/generated/azure_mgmt_devtestlabs/virtual_network_operations.rb +150 -150
- metadata +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -100,6 +100,7 @@ module Azure::ARM::DevTestLabs
|
|
|
100
100
|
@accept_language = 'en-US'
|
|
101
101
|
@long_running_operation_retry_timeout = 30
|
|
102
102
|
@generate_client_request_id = true
|
|
103
|
+
add_telemetry
|
|
103
104
|
end
|
|
104
105
|
|
|
105
106
|
#
|
|
@@ -157,5 +158,17 @@ module Azure::ARM::DevTestLabs
|
|
|
157
158
|
super(request_url, method, path, options)
|
|
158
159
|
end
|
|
159
160
|
|
|
161
|
+
|
|
162
|
+
private
|
|
163
|
+
#
|
|
164
|
+
# Adds telemetry information.
|
|
165
|
+
#
|
|
166
|
+
def add_telemetry
|
|
167
|
+
sdk_information = 'azure_mgmt_devtestlabs'
|
|
168
|
+
if defined? Azure::ARM::DevTestLabs::VERSION
|
|
169
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::DevTestLabs::VERSION}"
|
|
170
|
+
end
|
|
171
|
+
add_user_agent_information(sdk_information)
|
|
172
|
+
end
|
|
160
173
|
end
|
|
161
174
|
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
6
6
|
module Azure::ARM::DevTestLabs
|
|
7
7
|
#
|
|
8
|
-
#
|
|
8
|
+
# Azure DevTest Labs REST API.
|
|
9
9
|
#
|
|
10
10
|
class FormulaOperations
|
|
11
11
|
include Azure::ARM::DevTestLabs::Models
|
|
@@ -30,35 +30,8 @@ module Azure::ARM::DevTestLabs
|
|
|
30
30
|
# @param filter [String] The filter to apply on the operation.
|
|
31
31
|
# @param top [Integer] The maximum number of resources to return from the
|
|
32
32
|
# operation.
|
|
33
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
34
|
-
#
|
|
35
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
36
|
-
# will be added to the HTTP request.
|
|
37
|
-
#
|
|
38
|
-
# @return [ResponseWithContinuationFormula] which provide lazy access to pages
|
|
39
|
-
# of the response.
|
|
40
|
-
#
|
|
41
|
-
def list_as_lazy(resource_group_name, lab_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
|
|
42
|
-
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
|
43
|
-
unless response.nil?
|
|
44
|
-
page = response.body
|
|
45
|
-
page.next_method = Proc.new do |next_page_link|
|
|
46
|
-
list_next_async(next_page_link, custom_headers)
|
|
47
|
-
end
|
|
48
|
-
page
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
#
|
|
53
|
-
# List formulas in a given lab.
|
|
54
|
-
#
|
|
55
|
-
# @param resource_group_name [String] The name of the resource group.
|
|
56
|
-
# @param lab_name [String] The name of the lab.
|
|
57
|
-
# @param filter [String] The filter to apply on the operation.
|
|
58
|
-
# @param top [Integer] The maximum number of resources to return from the
|
|
59
|
-
# operation.
|
|
60
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
61
|
-
# OData notation.
|
|
33
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
34
|
+
# notation.
|
|
62
35
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
63
36
|
# will be added to the HTTP request.
|
|
64
37
|
#
|
|
@@ -77,8 +50,8 @@ module Azure::ARM::DevTestLabs
|
|
|
77
50
|
# @param filter [String] The filter to apply on the operation.
|
|
78
51
|
# @param top [Integer] The maximum number of resources to return from the
|
|
79
52
|
# operation.
|
|
80
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
81
|
-
#
|
|
53
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
54
|
+
# notation.
|
|
82
55
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
83
56
|
# will be added to the HTTP request.
|
|
84
57
|
#
|
|
@@ -96,8 +69,8 @@ module Azure::ARM::DevTestLabs
|
|
|
96
69
|
# @param filter [String] The filter to apply on the operation.
|
|
97
70
|
# @param top [Integer] The maximum number of resources to return from the
|
|
98
71
|
# operation.
|
|
99
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
100
|
-
#
|
|
72
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
73
|
+
# notation.
|
|
101
74
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
102
75
|
# to the HTTP request.
|
|
103
76
|
#
|
|
@@ -298,59 +271,51 @@ module Azure::ARM::DevTestLabs
|
|
|
298
271
|
end
|
|
299
272
|
|
|
300
273
|
#
|
|
301
|
-
#
|
|
302
|
-
# complete.
|
|
274
|
+
# Delete formula.
|
|
303
275
|
#
|
|
304
276
|
# @param resource_group_name [String] The name of the resource group.
|
|
305
277
|
# @param lab_name [String] The name of the lab.
|
|
306
278
|
# @param name [String] The name of the formula.
|
|
307
|
-
# @param formula [Formula]
|
|
308
279
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
309
280
|
# will be added to the HTTP request.
|
|
310
281
|
#
|
|
311
|
-
# @return [Formula] operation results.
|
|
312
282
|
#
|
|
313
|
-
def
|
|
314
|
-
response =
|
|
315
|
-
|
|
283
|
+
def delete_resource(resource_group_name, lab_name, name, custom_headers = nil)
|
|
284
|
+
response = delete_resource_async(resource_group_name, lab_name, name, custom_headers).value!
|
|
285
|
+
nil
|
|
316
286
|
end
|
|
317
287
|
|
|
318
288
|
#
|
|
319
|
-
#
|
|
320
|
-
# complete.
|
|
289
|
+
# Delete formula.
|
|
321
290
|
#
|
|
322
291
|
# @param resource_group_name [String] The name of the resource group.
|
|
323
292
|
# @param lab_name [String] The name of the lab.
|
|
324
293
|
# @param name [String] The name of the formula.
|
|
325
|
-
# @param formula [Formula]
|
|
326
294
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
327
295
|
# will be added to the HTTP request.
|
|
328
296
|
#
|
|
329
297
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
330
298
|
#
|
|
331
|
-
def
|
|
332
|
-
|
|
299
|
+
def delete_resource_with_http_info(resource_group_name, lab_name, name, custom_headers = nil)
|
|
300
|
+
delete_resource_async(resource_group_name, lab_name, name, custom_headers).value!
|
|
333
301
|
end
|
|
334
302
|
|
|
335
303
|
#
|
|
336
|
-
#
|
|
337
|
-
# complete.
|
|
304
|
+
# Delete formula.
|
|
338
305
|
#
|
|
339
306
|
# @param resource_group_name [String] The name of the resource group.
|
|
340
307
|
# @param lab_name [String] The name of the lab.
|
|
341
308
|
# @param name [String] The name of the formula.
|
|
342
|
-
# @param formula [Formula]
|
|
343
309
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
344
310
|
# to the HTTP request.
|
|
345
311
|
#
|
|
346
312
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
347
313
|
#
|
|
348
|
-
def
|
|
314
|
+
def delete_resource_async(resource_group_name, lab_name, name, custom_headers = nil)
|
|
349
315
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
350
316
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
351
317
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
|
352
318
|
fail ArgumentError, 'name is nil' if name.nil?
|
|
353
|
-
fail ArgumentError, 'formula is nil' if formula.nil?
|
|
354
319
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
355
320
|
|
|
356
321
|
|
|
@@ -359,14 +324,6 @@ module Azure::ARM::DevTestLabs
|
|
|
359
324
|
# Set Headers
|
|
360
325
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
361
326
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
362
|
-
|
|
363
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
364
|
-
|
|
365
|
-
# Serialize Request
|
|
366
|
-
request_mapper = Formula.mapper()
|
|
367
|
-
request_content = @client.serialize(request_mapper, formula, 'formula')
|
|
368
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
369
|
-
|
|
370
327
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'
|
|
371
328
|
|
|
372
329
|
request_url = @base_url || @client.base_url
|
|
@@ -375,42 +332,21 @@ module Azure::ARM::DevTestLabs
|
|
|
375
332
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
376
333
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
|
377
334
|
query_params: {'api-version' => @client.api_version},
|
|
378
|
-
body: request_content,
|
|
379
335
|
headers: request_headers.merge(custom_headers || {}),
|
|
380
336
|
base_url: request_url
|
|
381
337
|
}
|
|
382
|
-
promise = @client.make_request_async(:
|
|
338
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
383
339
|
|
|
384
340
|
promise = promise.then do |result|
|
|
385
341
|
http_response = result.response
|
|
386
342
|
status_code = http_response.status
|
|
387
343
|
response_content = http_response.body
|
|
388
|
-
unless status_code == 200 || status_code ==
|
|
344
|
+
unless status_code == 200 || status_code == 204
|
|
389
345
|
error_model = JSON.load(response_content)
|
|
390
346
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
391
347
|
end
|
|
392
348
|
|
|
393
349
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
394
|
-
# Deserialize Response
|
|
395
|
-
if status_code == 200
|
|
396
|
-
begin
|
|
397
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
398
|
-
result_mapper = Formula.mapper()
|
|
399
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
400
|
-
rescue Exception => e
|
|
401
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
402
|
-
end
|
|
403
|
-
end
|
|
404
|
-
# Deserialize Response
|
|
405
|
-
if status_code == 201
|
|
406
|
-
begin
|
|
407
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
408
|
-
result_mapper = Formula.mapper()
|
|
409
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
410
|
-
rescue Exception => e
|
|
411
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
412
|
-
end
|
|
413
|
-
end
|
|
414
350
|
|
|
415
351
|
result
|
|
416
352
|
end
|
|
@@ -419,51 +355,59 @@ module Azure::ARM::DevTestLabs
|
|
|
419
355
|
end
|
|
420
356
|
|
|
421
357
|
#
|
|
422
|
-
#
|
|
358
|
+
# Create or replace an existing Formula. This operation can take a while to
|
|
359
|
+
# complete.
|
|
423
360
|
#
|
|
424
361
|
# @param resource_group_name [String] The name of the resource group.
|
|
425
362
|
# @param lab_name [String] The name of the lab.
|
|
426
363
|
# @param name [String] The name of the formula.
|
|
364
|
+
# @param formula [Formula]
|
|
427
365
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
428
366
|
# will be added to the HTTP request.
|
|
429
367
|
#
|
|
368
|
+
# @return [Formula] operation results.
|
|
430
369
|
#
|
|
431
|
-
def
|
|
432
|
-
response =
|
|
433
|
-
nil
|
|
370
|
+
def begin_create_or_update_resource(resource_group_name, lab_name, name, formula, custom_headers = nil)
|
|
371
|
+
response = begin_create_or_update_resource_async(resource_group_name, lab_name, name, formula, custom_headers).value!
|
|
372
|
+
response.body unless response.nil?
|
|
434
373
|
end
|
|
435
374
|
|
|
436
375
|
#
|
|
437
|
-
#
|
|
376
|
+
# Create or replace an existing Formula. This operation can take a while to
|
|
377
|
+
# complete.
|
|
438
378
|
#
|
|
439
379
|
# @param resource_group_name [String] The name of the resource group.
|
|
440
380
|
# @param lab_name [String] The name of the lab.
|
|
441
381
|
# @param name [String] The name of the formula.
|
|
382
|
+
# @param formula [Formula]
|
|
442
383
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
443
384
|
# will be added to the HTTP request.
|
|
444
385
|
#
|
|
445
386
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
446
387
|
#
|
|
447
|
-
def
|
|
448
|
-
|
|
388
|
+
def begin_create_or_update_resource_with_http_info(resource_group_name, lab_name, name, formula, custom_headers = nil)
|
|
389
|
+
begin_create_or_update_resource_async(resource_group_name, lab_name, name, formula, custom_headers).value!
|
|
449
390
|
end
|
|
450
391
|
|
|
451
392
|
#
|
|
452
|
-
#
|
|
393
|
+
# Create or replace an existing Formula. This operation can take a while to
|
|
394
|
+
# complete.
|
|
453
395
|
#
|
|
454
396
|
# @param resource_group_name [String] The name of the resource group.
|
|
455
397
|
# @param lab_name [String] The name of the lab.
|
|
456
398
|
# @param name [String] The name of the formula.
|
|
399
|
+
# @param formula [Formula]
|
|
457
400
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
458
401
|
# to the HTTP request.
|
|
459
402
|
#
|
|
460
403
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
461
404
|
#
|
|
462
|
-
def
|
|
405
|
+
def begin_create_or_update_resource_async(resource_group_name, lab_name, name, formula, custom_headers = nil)
|
|
463
406
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
464
407
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
465
408
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
|
466
409
|
fail ArgumentError, 'name is nil' if name.nil?
|
|
410
|
+
fail ArgumentError, 'formula is nil' if formula.nil?
|
|
467
411
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
468
412
|
|
|
469
413
|
|
|
@@ -472,6 +416,14 @@ module Azure::ARM::DevTestLabs
|
|
|
472
416
|
# Set Headers
|
|
473
417
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
474
418
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
419
|
+
|
|
420
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
421
|
+
|
|
422
|
+
# Serialize Request
|
|
423
|
+
request_mapper = Formula.mapper()
|
|
424
|
+
request_content = @client.serialize(request_mapper, formula, 'formula')
|
|
425
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
426
|
+
|
|
475
427
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/formulas/{name}'
|
|
476
428
|
|
|
477
429
|
request_url = @base_url || @client.base_url
|
|
@@ -480,21 +432,42 @@ module Azure::ARM::DevTestLabs
|
|
|
480
432
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
481
433
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
|
482
434
|
query_params: {'api-version' => @client.api_version},
|
|
435
|
+
body: request_content,
|
|
483
436
|
headers: request_headers.merge(custom_headers || {}),
|
|
484
437
|
base_url: request_url
|
|
485
438
|
}
|
|
486
|
-
promise = @client.make_request_async(:
|
|
439
|
+
promise = @client.make_request_async(:put, path_template, options)
|
|
487
440
|
|
|
488
441
|
promise = promise.then do |result|
|
|
489
442
|
http_response = result.response
|
|
490
443
|
status_code = http_response.status
|
|
491
444
|
response_content = http_response.body
|
|
492
|
-
unless status_code == 200 || status_code ==
|
|
445
|
+
unless status_code == 200 || status_code == 201
|
|
493
446
|
error_model = JSON.load(response_content)
|
|
494
447
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
495
448
|
end
|
|
496
449
|
|
|
497
450
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
451
|
+
# Deserialize Response
|
|
452
|
+
if status_code == 200
|
|
453
|
+
begin
|
|
454
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
455
|
+
result_mapper = Formula.mapper()
|
|
456
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
457
|
+
rescue Exception => e
|
|
458
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
459
|
+
end
|
|
460
|
+
end
|
|
461
|
+
# Deserialize Response
|
|
462
|
+
if status_code == 201
|
|
463
|
+
begin
|
|
464
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
465
|
+
result_mapper = Formula.mapper()
|
|
466
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
|
467
|
+
rescue Exception => e
|
|
468
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
469
|
+
end
|
|
470
|
+
end
|
|
498
471
|
|
|
499
472
|
result
|
|
500
473
|
end
|
|
@@ -505,8 +478,8 @@ module Azure::ARM::DevTestLabs
|
|
|
505
478
|
#
|
|
506
479
|
# List formulas in a given lab.
|
|
507
480
|
#
|
|
508
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
|
509
|
-
#
|
|
481
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
482
|
+
# to List operation.
|
|
510
483
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
511
484
|
# will be added to the HTTP request.
|
|
512
485
|
#
|
|
@@ -520,8 +493,8 @@ module Azure::ARM::DevTestLabs
|
|
|
520
493
|
#
|
|
521
494
|
# List formulas in a given lab.
|
|
522
495
|
#
|
|
523
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
|
524
|
-
#
|
|
496
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
497
|
+
# to List operation.
|
|
525
498
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
526
499
|
# will be added to the HTTP request.
|
|
527
500
|
#
|
|
@@ -534,8 +507,8 @@ module Azure::ARM::DevTestLabs
|
|
|
534
507
|
#
|
|
535
508
|
# List formulas in a given lab.
|
|
536
509
|
#
|
|
537
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
|
538
|
-
#
|
|
510
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
511
|
+
# to List operation.
|
|
539
512
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
540
513
|
# to the HTTP request.
|
|
541
514
|
#
|
|
@@ -589,5 +562,32 @@ module Azure::ARM::DevTestLabs
|
|
|
589
562
|
promise.execute
|
|
590
563
|
end
|
|
591
564
|
|
|
565
|
+
#
|
|
566
|
+
# List formulas in a given lab.
|
|
567
|
+
#
|
|
568
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
569
|
+
# @param lab_name [String] The name of the lab.
|
|
570
|
+
# @param filter [String] The filter to apply on the operation.
|
|
571
|
+
# @param top [Integer] The maximum number of resources to return from the
|
|
572
|
+
# operation.
|
|
573
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
574
|
+
# notation.
|
|
575
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
576
|
+
# will be added to the HTTP request.
|
|
577
|
+
#
|
|
578
|
+
# @return [ResponseWithContinuationFormula] which provide lazy access to pages
|
|
579
|
+
# of the response.
|
|
580
|
+
#
|
|
581
|
+
def list_as_lazy(resource_group_name, lab_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
|
|
582
|
+
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
|
583
|
+
unless response.nil?
|
|
584
|
+
page = response.body
|
|
585
|
+
page.next_method = Proc.new do |next_page_link|
|
|
586
|
+
list_next_async(next_page_link, custom_headers)
|
|
587
|
+
end
|
|
588
|
+
page
|
|
589
|
+
end
|
|
590
|
+
end
|
|
591
|
+
|
|
592
592
|
end
|
|
593
593
|
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
6
6
|
module Azure::ARM::DevTestLabs
|
|
7
7
|
#
|
|
8
|
-
#
|
|
8
|
+
# Azure DevTest Labs REST API.
|
|
9
9
|
#
|
|
10
10
|
class GalleryImageOperations
|
|
11
11
|
include Azure::ARM::DevTestLabs::Models
|
|
@@ -30,35 +30,8 @@ module Azure::ARM::DevTestLabs
|
|
|
30
30
|
# @param filter [String] The filter to apply on the operation.
|
|
31
31
|
# @param top [Integer] The maximum number of resources to return from the
|
|
32
32
|
# operation.
|
|
33
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
34
|
-
#
|
|
35
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
36
|
-
# will be added to the HTTP request.
|
|
37
|
-
#
|
|
38
|
-
# @return [ResponseWithContinuationGalleryImage] which provide lazy access to
|
|
39
|
-
# pages of the response.
|
|
40
|
-
#
|
|
41
|
-
def list_as_lazy(resource_group_name, lab_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
|
|
42
|
-
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
|
43
|
-
unless response.nil?
|
|
44
|
-
page = response.body
|
|
45
|
-
page.next_method = Proc.new do |next_page_link|
|
|
46
|
-
list_next_async(next_page_link, custom_headers)
|
|
47
|
-
end
|
|
48
|
-
page
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
#
|
|
53
|
-
# List gallery images in a given lab.
|
|
54
|
-
#
|
|
55
|
-
# @param resource_group_name [String] The name of the resource group.
|
|
56
|
-
# @param lab_name [String] The name of the lab.
|
|
57
|
-
# @param filter [String] The filter to apply on the operation.
|
|
58
|
-
# @param top [Integer] The maximum number of resources to return from the
|
|
59
|
-
# operation.
|
|
60
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
61
|
-
# OData notation.
|
|
33
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
34
|
+
# notation.
|
|
62
35
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
63
36
|
# will be added to the HTTP request.
|
|
64
37
|
#
|
|
@@ -77,8 +50,8 @@ module Azure::ARM::DevTestLabs
|
|
|
77
50
|
# @param filter [String] The filter to apply on the operation.
|
|
78
51
|
# @param top [Integer] The maximum number of resources to return from the
|
|
79
52
|
# operation.
|
|
80
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
81
|
-
#
|
|
53
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
54
|
+
# notation.
|
|
82
55
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
83
56
|
# will be added to the HTTP request.
|
|
84
57
|
#
|
|
@@ -96,8 +69,8 @@ module Azure::ARM::DevTestLabs
|
|
|
96
69
|
# @param filter [String] The filter to apply on the operation.
|
|
97
70
|
# @param top [Integer] The maximum number of resources to return from the
|
|
98
71
|
# operation.
|
|
99
|
-
# @param order_by [String] The ordering expression for the results, using
|
|
100
|
-
#
|
|
72
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
73
|
+
# notation.
|
|
101
74
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
102
75
|
# to the HTTP request.
|
|
103
76
|
#
|
|
@@ -158,8 +131,8 @@ module Azure::ARM::DevTestLabs
|
|
|
158
131
|
#
|
|
159
132
|
# List gallery images in a given lab.
|
|
160
133
|
#
|
|
161
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
|
162
|
-
#
|
|
134
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
135
|
+
# to List operation.
|
|
163
136
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
164
137
|
# will be added to the HTTP request.
|
|
165
138
|
#
|
|
@@ -173,8 +146,8 @@ module Azure::ARM::DevTestLabs
|
|
|
173
146
|
#
|
|
174
147
|
# List gallery images in a given lab.
|
|
175
148
|
#
|
|
176
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
|
177
|
-
#
|
|
149
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
150
|
+
# to List operation.
|
|
178
151
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
179
152
|
# will be added to the HTTP request.
|
|
180
153
|
#
|
|
@@ -187,8 +160,8 @@ module Azure::ARM::DevTestLabs
|
|
|
187
160
|
#
|
|
188
161
|
# List gallery images in a given lab.
|
|
189
162
|
#
|
|
190
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
|
191
|
-
#
|
|
163
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
164
|
+
# to List operation.
|
|
192
165
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
193
166
|
# to the HTTP request.
|
|
194
167
|
#
|
|
@@ -242,5 +215,32 @@ module Azure::ARM::DevTestLabs
|
|
|
242
215
|
promise.execute
|
|
243
216
|
end
|
|
244
217
|
|
|
218
|
+
#
|
|
219
|
+
# List gallery images in a given lab.
|
|
220
|
+
#
|
|
221
|
+
# @param resource_group_name [String] The name of the resource group.
|
|
222
|
+
# @param lab_name [String] The name of the lab.
|
|
223
|
+
# @param filter [String] The filter to apply on the operation.
|
|
224
|
+
# @param top [Integer] The maximum number of resources to return from the
|
|
225
|
+
# operation.
|
|
226
|
+
# @param order_by [String] The ordering expression for the results, using OData
|
|
227
|
+
# notation.
|
|
228
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
229
|
+
# will be added to the HTTP request.
|
|
230
|
+
#
|
|
231
|
+
# @return [ResponseWithContinuationGalleryImage] which provide lazy access to
|
|
232
|
+
# pages of the response.
|
|
233
|
+
#
|
|
234
|
+
def list_as_lazy(resource_group_name, lab_name, filter = nil, top = nil, order_by = nil, custom_headers = nil)
|
|
235
|
+
response = list_async(resource_group_name, lab_name, filter, top, order_by, custom_headers).value!
|
|
236
|
+
unless response.nil?
|
|
237
|
+
page = response.body
|
|
238
|
+
page.next_method = Proc.new do |next_page_link|
|
|
239
|
+
list_next_async(next_page_link, custom_headers)
|
|
240
|
+
end
|
|
241
|
+
page
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
|
|
245
245
|
end
|
|
246
246
|
end
|