azure_mgmt_compute 0.8.0 → 0.9.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_compute.rb +86 -54
- data/lib/generated/azure_mgmt_compute/availability_sets.rb +17 -6
- data/lib/generated/azure_mgmt_compute/compute_management_client.rb +17 -6
- data/lib/generated/azure_mgmt_compute/disks.rb +1273 -0
- data/lib/generated/azure_mgmt_compute/images.rb +808 -0
- data/lib/generated/azure_mgmt_compute/models/access_level.rb +16 -0
- data/lib/generated/azure_mgmt_compute/models/access_uri.rb +45 -0
- data/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/api_error.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/api_error_base.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/availability_set.rb +21 -0
- data/lib/generated/azure_mgmt_compute/models/container_service.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb +2 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/creation_data.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/data_disk.rb +13 -2
- data/lib/generated/azure_mgmt_compute/models/disk.rb +174 -0
- data/lib/generated/azure_mgmt_compute/models/disk_create_option.rb +20 -0
- data/lib/generated/azure_mgmt_compute/models/disk_list.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/disk_update.rb +109 -0
- data/lib/generated/azure_mgmt_compute/models/encryption_settings.rb +72 -0
- data/lib/generated/azure_mgmt_compute/models/grant_access_data.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/image.rb +113 -0
- data/lib/generated/azure_mgmt_compute/models/image_data_disk.rb +99 -0
- data/lib/generated/azure_mgmt_compute/models/image_disk_reference.rb +57 -0
- data/lib/generated/azure_mgmt_compute/models/image_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/image_osdisk.rb +113 -0
- data/lib/generated/azure_mgmt_compute/models/image_reference.rb +8 -1
- data/lib/generated/azure_mgmt_compute/models/image_storage_profile.rb +63 -0
- data/lib/generated/azure_mgmt_compute/models/inner_error.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/key_vault_and_key_reference.rb +57 -0
- data/lib/generated/azure_mgmt_compute/models/key_vault_and_secret_reference.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/managed_disk_parameters.rb +53 -0
- data/lib/generated/azure_mgmt_compute/models/operating_system_state_types.rb +16 -0
- data/lib/generated/azure_mgmt_compute/models/operation_status_response.rb +90 -0
- data/lib/generated/azure_mgmt_compute/models/osdisk.rb +14 -3
- data/lib/generated/azure_mgmt_compute/models/osprofile.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/resource_update.rb +51 -0
- data/lib/generated/azure_mgmt_compute/models/snapshot.rb +174 -0
- data/lib/generated/azure_mgmt_compute/models/snapshot_list.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/snapshot_update.rb +109 -0
- data/lib/generated/azure_mgmt_compute/models/source_vault.rb +45 -0
- data/lib/generated/azure_mgmt_compute/models/storage_account_types.rb +16 -0
- data/lib/generated/azure_mgmt_compute/models/sub_resource_read_only.rb +46 -0
- data/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +27 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_data_disk.rb +101 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +8 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_managed_disk_parameters.rb +47 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +19 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +20 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +21 -10
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +19 -8
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +2 -2
- data/lib/generated/azure_mgmt_compute/snapshots.rb +1273 -0
- data/lib/generated/azure_mgmt_compute/usage_operations.rb +1 -1
- data/lib/generated/azure_mgmt_compute/version.rb +1 -1
- data/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +3 -3
- data/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb +21 -6
- data/lib/generated/azure_mgmt_compute/virtual_machine_images.rb +5 -5
- data/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +263 -26
- data/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +298 -37
- data/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb +1 -1
- data/lib/generated/azure_mgmt_compute/virtual_machines.rb +270 -32
- metadata +36 -4
@@ -66,7 +66,7 @@ module Azure::ARM::Compute
|
|
66
66
|
#
|
67
67
|
def list_async(location, custom_headers = nil)
|
68
68
|
fail ArgumentError, 'location is nil' if location.nil?
|
69
|
-
api_version = '2016-
|
69
|
+
api_version = '2016-04-30-preview'
|
70
70
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
71
71
|
|
72
72
|
|
@@ -72,7 +72,7 @@ module Azure::ARM::Compute
|
|
72
72
|
fail ArgumentError, 'publisher_name is nil' if publisher_name.nil?
|
73
73
|
fail ArgumentError, 'type is nil' if type.nil?
|
74
74
|
fail ArgumentError, 'version is nil' if version.nil?
|
75
|
-
api_version = '2016-
|
75
|
+
api_version = '2016-04-30-preview'
|
76
76
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
77
77
|
|
78
78
|
|
@@ -163,7 +163,7 @@ module Azure::ARM::Compute
|
|
163
163
|
def list_types_async(location, publisher_name, custom_headers = nil)
|
164
164
|
fail ArgumentError, 'location is nil' if location.nil?
|
165
165
|
fail ArgumentError, 'publisher_name is nil' if publisher_name.nil?
|
166
|
-
api_version = '2016-
|
166
|
+
api_version = '2016-04-30-preview'
|
167
167
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
168
168
|
|
169
169
|
|
@@ -281,7 +281,7 @@ module Azure::ARM::Compute
|
|
281
281
|
fail ArgumentError, 'location is nil' if location.nil?
|
282
282
|
fail ArgumentError, 'publisher_name is nil' if publisher_name.nil?
|
283
283
|
fail ArgumentError, 'type is nil' if type.nil?
|
284
|
-
api_version = '2016-
|
284
|
+
api_version = '2016-04-30-preview'
|
285
285
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
286
286
|
|
287
287
|
|
@@ -82,9 +82,11 @@ module Azure::ARM::Compute
|
|
82
82
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
83
83
|
# will be added to the HTTP request.
|
84
84
|
#
|
85
|
+
# @return [OperationStatusResponse] operation results.
|
86
|
+
#
|
85
87
|
def delete(resource_group_name, vm_name, vm_extension_name, custom_headers = nil)
|
86
88
|
response = delete_async(resource_group_name, vm_name, vm_extension_name, custom_headers).value!
|
87
|
-
nil
|
89
|
+
response.body unless response.nil?
|
88
90
|
end
|
89
91
|
|
90
92
|
#
|
@@ -105,6 +107,8 @@ module Azure::ARM::Compute
|
|
105
107
|
promise = promise.then do |response|
|
106
108
|
# Defining deserialization method.
|
107
109
|
deserialize_method = lambda do |parsed_response|
|
110
|
+
result_mapper = OperationStatusResponse.mapper()
|
111
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
108
112
|
end
|
109
113
|
|
110
114
|
# Waiting for response.
|
@@ -166,7 +170,7 @@ module Azure::ARM::Compute
|
|
166
170
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
167
171
|
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
168
172
|
fail ArgumentError, 'vm_extension_name is nil' if vm_extension_name.nil?
|
169
|
-
api_version = '2016-
|
173
|
+
api_version = '2016-04-30-preview'
|
170
174
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
171
175
|
|
172
176
|
|
@@ -271,7 +275,7 @@ module Azure::ARM::Compute
|
|
271
275
|
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
272
276
|
fail ArgumentError, 'vm_extension_name is nil' if vm_extension_name.nil?
|
273
277
|
fail ArgumentError, 'extension_parameters is nil' if extension_parameters.nil?
|
274
|
-
api_version = '2016-
|
278
|
+
api_version = '2016-04-30-preview'
|
275
279
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
276
280
|
|
277
281
|
|
@@ -349,10 +353,11 @@ module Azure::ARM::Compute
|
|
349
353
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
350
354
|
# will be added to the HTTP request.
|
351
355
|
#
|
356
|
+
# @return [OperationStatusResponse] operation results.
|
352
357
|
#
|
353
358
|
def begin_delete(resource_group_name, vm_name, vm_extension_name, custom_headers = nil)
|
354
359
|
response = begin_delete_async(resource_group_name, vm_name, vm_extension_name, custom_headers).value!
|
355
|
-
nil
|
360
|
+
response.body unless response.nil?
|
356
361
|
end
|
357
362
|
|
358
363
|
#
|
@@ -387,7 +392,7 @@ module Azure::ARM::Compute
|
|
387
392
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
388
393
|
fail ArgumentError, 'vm_name is nil' if vm_name.nil?
|
389
394
|
fail ArgumentError, 'vm_extension_name is nil' if vm_extension_name.nil?
|
390
|
-
api_version = '2016-
|
395
|
+
api_version = '2016-04-30-preview'
|
391
396
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
392
397
|
|
393
398
|
|
@@ -413,12 +418,22 @@ module Azure::ARM::Compute
|
|
413
418
|
http_response = result.response
|
414
419
|
status_code = http_response.status
|
415
420
|
response_content = http_response.body
|
416
|
-
unless status_code == 202 || status_code == 204
|
421
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
417
422
|
error_model = JSON.load(response_content)
|
418
423
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
419
424
|
end
|
420
425
|
|
421
426
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
427
|
+
# Deserialize Response
|
428
|
+
if status_code == 200
|
429
|
+
begin
|
430
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
431
|
+
result_mapper = OperationStatusResponse.mapper()
|
432
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
433
|
+
rescue Exception => e
|
434
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
435
|
+
end
|
436
|
+
end
|
422
437
|
|
423
438
|
result
|
424
439
|
end
|
@@ -76,7 +76,7 @@ module Azure::ARM::Compute
|
|
76
76
|
fail ArgumentError, 'offer is nil' if offer.nil?
|
77
77
|
fail ArgumentError, 'skus is nil' if skus.nil?
|
78
78
|
fail ArgumentError, 'version is nil' if version.nil?
|
79
|
-
api_version = '2016-
|
79
|
+
api_version = '2016-04-30-preview'
|
80
80
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
81
81
|
|
82
82
|
|
@@ -187,7 +187,7 @@ module Azure::ARM::Compute
|
|
187
187
|
fail ArgumentError, 'publisher_name is nil' if publisher_name.nil?
|
188
188
|
fail ArgumentError, 'offer is nil' if offer.nil?
|
189
189
|
fail ArgumentError, 'skus is nil' if skus.nil?
|
190
|
-
api_version = '2016-
|
190
|
+
api_version = '2016-04-30-preview'
|
191
191
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
192
192
|
|
193
193
|
|
@@ -295,7 +295,7 @@ module Azure::ARM::Compute
|
|
295
295
|
def list_offers_async(location, publisher_name, custom_headers = nil)
|
296
296
|
fail ArgumentError, 'location is nil' if location.nil?
|
297
297
|
fail ArgumentError, 'publisher_name is nil' if publisher_name.nil?
|
298
|
-
api_version = '2016-
|
298
|
+
api_version = '2016-04-30-preview'
|
299
299
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
300
300
|
|
301
301
|
|
@@ -399,7 +399,7 @@ module Azure::ARM::Compute
|
|
399
399
|
#
|
400
400
|
def list_publishers_async(location, custom_headers = nil)
|
401
401
|
fail ArgumentError, 'location is nil' if location.nil?
|
402
|
-
api_version = '2016-
|
402
|
+
api_version = '2016-04-30-preview'
|
403
403
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
404
404
|
|
405
405
|
|
@@ -511,7 +511,7 @@ module Azure::ARM::Compute
|
|
511
511
|
fail ArgumentError, 'location is nil' if location.nil?
|
512
512
|
fail ArgumentError, 'publisher_name is nil' if publisher_name.nil?
|
513
513
|
fail ArgumentError, 'offer is nil' if offer.nil?
|
514
|
-
api_version = '2016-
|
514
|
+
api_version = '2016-04-30-preview'
|
515
515
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
516
516
|
|
517
517
|
|
@@ -32,9 +32,11 @@ module Azure::ARM::Compute
|
|
32
32
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
33
|
# will be added to the HTTP request.
|
34
34
|
#
|
35
|
+
# @return [OperationStatusResponse] operation results.
|
36
|
+
#
|
35
37
|
def reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
36
38
|
response = reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
37
|
-
nil
|
39
|
+
response.body unless response.nil?
|
38
40
|
end
|
39
41
|
|
40
42
|
#
|
@@ -54,6 +56,54 @@ module Azure::ARM::Compute
|
|
54
56
|
promise = promise.then do |response|
|
55
57
|
# Defining deserialization method.
|
56
58
|
deserialize_method = lambda do |parsed_response|
|
59
|
+
result_mapper = OperationStatusResponse.mapper()
|
60
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
61
|
+
end
|
62
|
+
|
63
|
+
# Waiting for response.
|
64
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
65
|
+
end
|
66
|
+
|
67
|
+
promise
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Allows you to re-image all the disks ( including data disks ) in the a
|
72
|
+
# virtual machine scale set instance. This operation is only supported for
|
73
|
+
# managed disks.
|
74
|
+
#
|
75
|
+
# @param resource_group_name [String] The name of the resource group.
|
76
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
77
|
+
# @param instance_id [String] The instance ID of the virtual machine.
|
78
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
79
|
+
# will be added to the HTTP request.
|
80
|
+
#
|
81
|
+
# @return [OperationStatusResponse] operation results.
|
82
|
+
#
|
83
|
+
def reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
84
|
+
response = reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
85
|
+
response.body unless response.nil?
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
# @param resource_group_name [String] The name of the resource group.
|
90
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
91
|
+
# @param instance_id [String] The instance ID of the virtual machine.
|
92
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
93
|
+
# will be added to the HTTP request.
|
94
|
+
#
|
95
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
96
|
+
# response.
|
97
|
+
#
|
98
|
+
def reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
99
|
+
# Send request
|
100
|
+
promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers)
|
101
|
+
|
102
|
+
promise = promise.then do |response|
|
103
|
+
# Defining deserialization method.
|
104
|
+
deserialize_method = lambda do |parsed_response|
|
105
|
+
result_mapper = OperationStatusResponse.mapper()
|
106
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
57
107
|
end
|
58
108
|
|
59
109
|
# Waiting for response.
|
@@ -75,9 +125,11 @@ module Azure::ARM::Compute
|
|
75
125
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
76
126
|
# will be added to the HTTP request.
|
77
127
|
#
|
128
|
+
# @return [OperationStatusResponse] operation results.
|
129
|
+
#
|
78
130
|
def deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
79
131
|
response = deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
80
|
-
nil
|
132
|
+
response.body unless response.nil?
|
81
133
|
end
|
82
134
|
|
83
135
|
#
|
@@ -97,6 +149,8 @@ module Azure::ARM::Compute
|
|
97
149
|
promise = promise.then do |response|
|
98
150
|
# Defining deserialization method.
|
99
151
|
deserialize_method = lambda do |parsed_response|
|
152
|
+
result_mapper = OperationStatusResponse.mapper()
|
153
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
100
154
|
end
|
101
155
|
|
102
156
|
# Waiting for response.
|
@@ -115,9 +169,11 @@ module Azure::ARM::Compute
|
|
115
169
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
116
170
|
# will be added to the HTTP request.
|
117
171
|
#
|
172
|
+
# @return [OperationStatusResponse] operation results.
|
173
|
+
#
|
118
174
|
def delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
119
175
|
response = delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
120
|
-
nil
|
176
|
+
response.body unless response.nil?
|
121
177
|
end
|
122
178
|
|
123
179
|
#
|
@@ -137,6 +193,8 @@ module Azure::ARM::Compute
|
|
137
193
|
promise = promise.then do |response|
|
138
194
|
# Defining deserialization method.
|
139
195
|
deserialize_method = lambda do |parsed_response|
|
196
|
+
result_mapper = OperationStatusResponse.mapper()
|
197
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
140
198
|
end
|
141
199
|
|
142
200
|
# Waiting for response.
|
@@ -192,7 +250,7 @@ module Azure::ARM::Compute
|
|
192
250
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
193
251
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
194
252
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
195
|
-
api_version = '2016-
|
253
|
+
api_version = '2016-04-30-preview'
|
196
254
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
197
255
|
|
198
256
|
|
@@ -287,7 +345,7 @@ module Azure::ARM::Compute
|
|
287
345
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
288
346
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
289
347
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
290
|
-
api_version = '2016-
|
348
|
+
api_version = '2016-04-30-preview'
|
291
349
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
292
350
|
|
293
351
|
|
@@ -387,7 +445,7 @@ module Azure::ARM::Compute
|
|
387
445
|
def list_async(resource_group_name, virtual_machine_scale_set_name, filter = nil, select = nil, expand = nil, custom_headers = nil)
|
388
446
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
389
447
|
fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_scale_set_name.nil?
|
390
|
-
api_version = '2016-
|
448
|
+
api_version = '2016-04-30-preview'
|
391
449
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
392
450
|
|
393
451
|
|
@@ -447,9 +505,11 @@ module Azure::ARM::Compute
|
|
447
505
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
448
506
|
# will be added to the HTTP request.
|
449
507
|
#
|
508
|
+
# @return [OperationStatusResponse] operation results.
|
509
|
+
#
|
450
510
|
def power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
451
511
|
response = power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
452
|
-
nil
|
512
|
+
response.body unless response.nil?
|
453
513
|
end
|
454
514
|
|
455
515
|
#
|
@@ -469,6 +529,8 @@ module Azure::ARM::Compute
|
|
469
529
|
promise = promise.then do |response|
|
470
530
|
# Defining deserialization method.
|
471
531
|
deserialize_method = lambda do |parsed_response|
|
532
|
+
result_mapper = OperationStatusResponse.mapper()
|
533
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
472
534
|
end
|
473
535
|
|
474
536
|
# Waiting for response.
|
@@ -487,9 +549,11 @@ module Azure::ARM::Compute
|
|
487
549
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
488
550
|
# will be added to the HTTP request.
|
489
551
|
#
|
552
|
+
# @return [OperationStatusResponse] operation results.
|
553
|
+
#
|
490
554
|
def restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
491
555
|
response = restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
492
|
-
nil
|
556
|
+
response.body unless response.nil?
|
493
557
|
end
|
494
558
|
|
495
559
|
#
|
@@ -509,6 +573,8 @@ module Azure::ARM::Compute
|
|
509
573
|
promise = promise.then do |response|
|
510
574
|
# Defining deserialization method.
|
511
575
|
deserialize_method = lambda do |parsed_response|
|
576
|
+
result_mapper = OperationStatusResponse.mapper()
|
577
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
512
578
|
end
|
513
579
|
|
514
580
|
# Waiting for response.
|
@@ -527,9 +593,11 @@ module Azure::ARM::Compute
|
|
527
593
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
528
594
|
# will be added to the HTTP request.
|
529
595
|
#
|
596
|
+
# @return [OperationStatusResponse] operation results.
|
597
|
+
#
|
530
598
|
def start(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
531
599
|
response = start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
532
|
-
nil
|
600
|
+
response.body unless response.nil?
|
533
601
|
end
|
534
602
|
|
535
603
|
#
|
@@ -549,6 +617,8 @@ module Azure::ARM::Compute
|
|
549
617
|
promise = promise.then do |response|
|
550
618
|
# Defining deserialization method.
|
551
619
|
deserialize_method = lambda do |parsed_response|
|
620
|
+
result_mapper = OperationStatusResponse.mapper()
|
621
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
552
622
|
end
|
553
623
|
|
554
624
|
# Waiting for response.
|
@@ -568,10 +638,11 @@ module Azure::ARM::Compute
|
|
568
638
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
569
639
|
# will be added to the HTTP request.
|
570
640
|
#
|
641
|
+
# @return [OperationStatusResponse] operation results.
|
571
642
|
#
|
572
643
|
def begin_reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
573
644
|
response = begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
574
|
-
nil
|
645
|
+
response.body unless response.nil?
|
575
646
|
end
|
576
647
|
|
577
648
|
#
|
@@ -606,7 +677,7 @@ module Azure::ARM::Compute
|
|
606
677
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
607
678
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
608
679
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
609
|
-
api_version = '2016-
|
680
|
+
api_version = '2016-04-30-preview'
|
610
681
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
611
682
|
|
612
683
|
|
@@ -632,12 +703,123 @@ module Azure::ARM::Compute
|
|
632
703
|
http_response = result.response
|
633
704
|
status_code = http_response.status
|
634
705
|
response_content = http_response.body
|
635
|
-
unless status_code == 202
|
706
|
+
unless status_code == 200 || status_code == 202
|
707
|
+
error_model = JSON.load(response_content)
|
708
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
709
|
+
end
|
710
|
+
|
711
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
712
|
+
# Deserialize Response
|
713
|
+
if status_code == 200
|
714
|
+
begin
|
715
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
716
|
+
result_mapper = OperationStatusResponse.mapper()
|
717
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
718
|
+
rescue Exception => e
|
719
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
720
|
+
end
|
721
|
+
end
|
722
|
+
|
723
|
+
result
|
724
|
+
end
|
725
|
+
|
726
|
+
promise.execute
|
727
|
+
end
|
728
|
+
|
729
|
+
#
|
730
|
+
# Allows you to re-image all the disks ( including data disks ) in the a
|
731
|
+
# virtual machine scale set instance. This operation is only supported for
|
732
|
+
# managed disks.
|
733
|
+
#
|
734
|
+
# @param resource_group_name [String] The name of the resource group.
|
735
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
736
|
+
# @param instance_id [String] The instance ID of the virtual machine.
|
737
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
738
|
+
# will be added to the HTTP request.
|
739
|
+
#
|
740
|
+
# @return [OperationStatusResponse] operation results.
|
741
|
+
#
|
742
|
+
def begin_reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
743
|
+
response = begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
744
|
+
response.body unless response.nil?
|
745
|
+
end
|
746
|
+
|
747
|
+
#
|
748
|
+
# Allows you to re-image all the disks ( including data disks ) in the a
|
749
|
+
# virtual machine scale set instance. This operation is only supported for
|
750
|
+
# managed disks.
|
751
|
+
#
|
752
|
+
# @param resource_group_name [String] The name of the resource group.
|
753
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
754
|
+
# @param instance_id [String] The instance ID of the virtual machine.
|
755
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
756
|
+
# will be added to the HTTP request.
|
757
|
+
#
|
758
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
759
|
+
#
|
760
|
+
def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
761
|
+
begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
762
|
+
end
|
763
|
+
|
764
|
+
#
|
765
|
+
# Allows you to re-image all the disks ( including data disks ) in the a
|
766
|
+
# virtual machine scale set instance. This operation is only supported for
|
767
|
+
# managed disks.
|
768
|
+
#
|
769
|
+
# @param resource_group_name [String] The name of the resource group.
|
770
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
771
|
+
# @param instance_id [String] The instance ID of the virtual machine.
|
772
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
773
|
+
# to the HTTP request.
|
774
|
+
#
|
775
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
776
|
+
#
|
777
|
+
def begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
778
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
779
|
+
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
780
|
+
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
781
|
+
api_version = '2016-04-30-preview'
|
782
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
783
|
+
|
784
|
+
|
785
|
+
request_headers = {}
|
786
|
+
|
787
|
+
# Set Headers
|
788
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
789
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
790
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall'
|
791
|
+
|
792
|
+
request_url = @base_url || @client.base_url
|
793
|
+
|
794
|
+
options = {
|
795
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
796
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id},
|
797
|
+
query_params: {'api-version' => api_version},
|
798
|
+
headers: request_headers.merge(custom_headers || {}),
|
799
|
+
base_url: request_url
|
800
|
+
}
|
801
|
+
promise = @client.make_request_async(:post, path_template, options)
|
802
|
+
|
803
|
+
promise = promise.then do |result|
|
804
|
+
http_response = result.response
|
805
|
+
status_code = http_response.status
|
806
|
+
response_content = http_response.body
|
807
|
+
unless status_code == 200 || status_code == 202
|
636
808
|
error_model = JSON.load(response_content)
|
637
809
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
638
810
|
end
|
639
811
|
|
640
812
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
813
|
+
# Deserialize Response
|
814
|
+
if status_code == 200
|
815
|
+
begin
|
816
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
817
|
+
result_mapper = OperationStatusResponse.mapper()
|
818
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
819
|
+
rescue Exception => e
|
820
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
821
|
+
end
|
822
|
+
end
|
641
823
|
|
642
824
|
result
|
643
825
|
end
|
@@ -657,10 +839,11 @@ module Azure::ARM::Compute
|
|
657
839
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
658
840
|
# will be added to the HTTP request.
|
659
841
|
#
|
842
|
+
# @return [OperationStatusResponse] operation results.
|
660
843
|
#
|
661
844
|
def begin_deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
662
845
|
response = begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
663
|
-
nil
|
846
|
+
response.body unless response.nil?
|
664
847
|
end
|
665
848
|
|
666
849
|
#
|
@@ -699,7 +882,7 @@ module Azure::ARM::Compute
|
|
699
882
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
700
883
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
701
884
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
702
|
-
api_version = '2016-
|
885
|
+
api_version = '2016-04-30-preview'
|
703
886
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
704
887
|
|
705
888
|
|
@@ -725,12 +908,22 @@ module Azure::ARM::Compute
|
|
725
908
|
http_response = result.response
|
726
909
|
status_code = http_response.status
|
727
910
|
response_content = http_response.body
|
728
|
-
unless status_code == 202
|
911
|
+
unless status_code == 200 || status_code == 202
|
729
912
|
error_model = JSON.load(response_content)
|
730
913
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
731
914
|
end
|
732
915
|
|
733
916
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
917
|
+
# Deserialize Response
|
918
|
+
if status_code == 200
|
919
|
+
begin
|
920
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
921
|
+
result_mapper = OperationStatusResponse.mapper()
|
922
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
923
|
+
rescue Exception => e
|
924
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
925
|
+
end
|
926
|
+
end
|
734
927
|
|
735
928
|
result
|
736
929
|
end
|
@@ -747,10 +940,11 @@ module Azure::ARM::Compute
|
|
747
940
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
748
941
|
# will be added to the HTTP request.
|
749
942
|
#
|
943
|
+
# @return [OperationStatusResponse] operation results.
|
750
944
|
#
|
751
945
|
def begin_delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
752
946
|
response = begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
753
|
-
nil
|
947
|
+
response.body unless response.nil?
|
754
948
|
end
|
755
949
|
|
756
950
|
#
|
@@ -783,7 +977,7 @@ module Azure::ARM::Compute
|
|
783
977
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
784
978
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
785
979
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
786
|
-
api_version = '2016-
|
980
|
+
api_version = '2016-04-30-preview'
|
787
981
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
788
982
|
|
789
983
|
|
@@ -815,6 +1009,16 @@ module Azure::ARM::Compute
|
|
815
1009
|
end
|
816
1010
|
|
817
1011
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1012
|
+
# Deserialize Response
|
1013
|
+
if status_code == 200
|
1014
|
+
begin
|
1015
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1016
|
+
result_mapper = OperationStatusResponse.mapper()
|
1017
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1018
|
+
rescue Exception => e
|
1019
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1020
|
+
end
|
1021
|
+
end
|
818
1022
|
|
819
1023
|
result
|
820
1024
|
end
|
@@ -833,10 +1037,11 @@ module Azure::ARM::Compute
|
|
833
1037
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
834
1038
|
# will be added to the HTTP request.
|
835
1039
|
#
|
1040
|
+
# @return [OperationStatusResponse] operation results.
|
836
1041
|
#
|
837
1042
|
def begin_power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
838
1043
|
response = begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
839
|
-
nil
|
1044
|
+
response.body unless response.nil?
|
840
1045
|
end
|
841
1046
|
|
842
1047
|
#
|
@@ -873,7 +1078,7 @@ module Azure::ARM::Compute
|
|
873
1078
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
874
1079
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
875
1080
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
876
|
-
api_version = '2016-
|
1081
|
+
api_version = '2016-04-30-preview'
|
877
1082
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
878
1083
|
|
879
1084
|
|
@@ -899,12 +1104,22 @@ module Azure::ARM::Compute
|
|
899
1104
|
http_response = result.response
|
900
1105
|
status_code = http_response.status
|
901
1106
|
response_content = http_response.body
|
902
|
-
unless status_code == 202
|
1107
|
+
unless status_code == 200 || status_code == 202
|
903
1108
|
error_model = JSON.load(response_content)
|
904
1109
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
905
1110
|
end
|
906
1111
|
|
907
1112
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1113
|
+
# Deserialize Response
|
1114
|
+
if status_code == 200
|
1115
|
+
begin
|
1116
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1117
|
+
result_mapper = OperationStatusResponse.mapper()
|
1118
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1119
|
+
rescue Exception => e
|
1120
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1121
|
+
end
|
1122
|
+
end
|
908
1123
|
|
909
1124
|
result
|
910
1125
|
end
|
@@ -921,10 +1136,11 @@ module Azure::ARM::Compute
|
|
921
1136
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
922
1137
|
# will be added to the HTTP request.
|
923
1138
|
#
|
1139
|
+
# @return [OperationStatusResponse] operation results.
|
924
1140
|
#
|
925
1141
|
def begin_restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
926
1142
|
response = begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
927
|
-
nil
|
1143
|
+
response.body unless response.nil?
|
928
1144
|
end
|
929
1145
|
|
930
1146
|
#
|
@@ -957,7 +1173,7 @@ module Azure::ARM::Compute
|
|
957
1173
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
958
1174
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
959
1175
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
960
|
-
api_version = '2016-
|
1176
|
+
api_version = '2016-04-30-preview'
|
961
1177
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
962
1178
|
|
963
1179
|
|
@@ -983,12 +1199,22 @@ module Azure::ARM::Compute
|
|
983
1199
|
http_response = result.response
|
984
1200
|
status_code = http_response.status
|
985
1201
|
response_content = http_response.body
|
986
|
-
unless status_code == 202
|
1202
|
+
unless status_code == 200 || status_code == 202
|
987
1203
|
error_model = JSON.load(response_content)
|
988
1204
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
989
1205
|
end
|
990
1206
|
|
991
1207
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1208
|
+
# Deserialize Response
|
1209
|
+
if status_code == 200
|
1210
|
+
begin
|
1211
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1212
|
+
result_mapper = OperationStatusResponse.mapper()
|
1213
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1214
|
+
rescue Exception => e
|
1215
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1216
|
+
end
|
1217
|
+
end
|
992
1218
|
|
993
1219
|
result
|
994
1220
|
end
|
@@ -1005,10 +1231,11 @@ module Azure::ARM::Compute
|
|
1005
1231
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1006
1232
|
# will be added to the HTTP request.
|
1007
1233
|
#
|
1234
|
+
# @return [OperationStatusResponse] operation results.
|
1008
1235
|
#
|
1009
1236
|
def begin_start(resource_group_name, vm_scale_set_name, instance_id, custom_headers = nil)
|
1010
1237
|
response = begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers).value!
|
1011
|
-
nil
|
1238
|
+
response.body unless response.nil?
|
1012
1239
|
end
|
1013
1240
|
|
1014
1241
|
#
|
@@ -1041,7 +1268,7 @@ module Azure::ARM::Compute
|
|
1041
1268
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1042
1269
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1043
1270
|
fail ArgumentError, 'instance_id is nil' if instance_id.nil?
|
1044
|
-
api_version = '2016-
|
1271
|
+
api_version = '2016-04-30-preview'
|
1045
1272
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1046
1273
|
|
1047
1274
|
|
@@ -1067,12 +1294,22 @@ module Azure::ARM::Compute
|
|
1067
1294
|
http_response = result.response
|
1068
1295
|
status_code = http_response.status
|
1069
1296
|
response_content = http_response.body
|
1070
|
-
unless status_code == 202
|
1297
|
+
unless status_code == 200 || status_code == 202
|
1071
1298
|
error_model = JSON.load(response_content)
|
1072
1299
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1073
1300
|
end
|
1074
1301
|
|
1075
1302
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1303
|
+
# Deserialize Response
|
1304
|
+
if status_code == 200
|
1305
|
+
begin
|
1306
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1307
|
+
result_mapper = OperationStatusResponse.mapper()
|
1308
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1309
|
+
rescue Exception => e
|
1310
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1311
|
+
end
|
1312
|
+
end
|
1076
1313
|
|
1077
1314
|
result
|
1078
1315
|
end
|