azure_mgmt_compute 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +1 -27
  3. data/azure_mgmt_compute.gemspec +1 -1
  4. data/lib/azure_mgmt_compute/availability_sets.rb +184 -141
  5. data/lib/azure_mgmt_compute/compute_management_client.rb +2 -2
  6. data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +1 -1
  7. data/lib/azure_mgmt_compute/models/api_entity_reference.rb +2 -3
  8. data/lib/azure_mgmt_compute/models/api_error.rb +1 -1
  9. data/lib/azure_mgmt_compute/models/api_error_base.rb +1 -1
  10. data/lib/azure_mgmt_compute/models/availability_set.rb +1 -1
  11. data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +1 -1
  12. data/lib/azure_mgmt_compute/models/availability_set_properties.rb +2 -2
  13. data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +3 -3
  14. data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +1 -1
  15. data/lib/azure_mgmt_compute/models/caching_types.rb +1 -1
  16. data/lib/azure_mgmt_compute/models/component_names.rb +1 -1
  17. data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -1
  18. data/lib/azure_mgmt_compute/models/data_disk.rb +1 -1
  19. data/lib/azure_mgmt_compute/models/data_disk_image.rb +1 -1
  20. data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +1 -1
  21. data/lib/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
  22. data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +11 -2
  23. data/lib/azure_mgmt_compute/models/disk_instance_view.rb +1 -1
  24. data/lib/azure_mgmt_compute/models/hardware_profile.rb +9 -6
  25. data/lib/azure_mgmt_compute/models/image_reference.rb +1 -1
  26. data/lib/azure_mgmt_compute/models/inner_error.rb +1 -1
  27. data/lib/azure_mgmt_compute/models/instance_view_status.rb +4 -4
  28. data/lib/azure_mgmt_compute/models/instance_view_types.rb +15 -0
  29. data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +1 -1
  30. data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +1 -1
  31. data/lib/azure_mgmt_compute/models/linux_configuration.rb +1 -1
  32. data/lib/azure_mgmt_compute/models/list_usages_result.rb +1 -1
  33. data/lib/azure_mgmt_compute/models/network_interface_reference.rb +1 -1
  34. data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +1 -1
  35. data/lib/azure_mgmt_compute/models/network_profile.rb +1 -1
  36. data/lib/azure_mgmt_compute/models/operating_system_types.rb +1 -1
  37. data/lib/azure_mgmt_compute/models/osdisk.rb +1 -1
  38. data/lib/azure_mgmt_compute/models/osdisk_image.rb +1 -1
  39. data/lib/azure_mgmt_compute/models/osprofile.rb +1 -1
  40. data/lib/azure_mgmt_compute/models/pass_names.rb +1 -1
  41. data/lib/azure_mgmt_compute/models/plan.rb +1 -1
  42. data/lib/azure_mgmt_compute/models/protocol_types.rb +1 -1
  43. data/lib/azure_mgmt_compute/models/purchase_plan.rb +1 -1
  44. data/lib/azure_mgmt_compute/models/setting_names.rb +1 -1
  45. data/lib/azure_mgmt_compute/models/sku.rb +1 -1
  46. data/lib/azure_mgmt_compute/models/ssh_configuration.rb +1 -1
  47. data/lib/azure_mgmt_compute/models/ssh_public_key.rb +1 -1
  48. data/lib/azure_mgmt_compute/models/status_level_types.rb +1 -1
  49. data/lib/azure_mgmt_compute/models/storage_profile.rb +1 -1
  50. data/lib/azure_mgmt_compute/models/upgrade_mode.rb +1 -1
  51. data/lib/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
  52. data/lib/azure_mgmt_compute/models/usage.rb +1 -1
  53. data/lib/azure_mgmt_compute/models/usage_name.rb +1 -1
  54. data/lib/azure_mgmt_compute/models/vault_certificate.rb +1 -1
  55. data/lib/azure_mgmt_compute/models/vault_secret_group.rb +1 -1
  56. data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +1 -1
  57. data/lib/azure_mgmt_compute/models/virtual_machine.rb +1 -1
  58. data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +1 -1
  59. data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +1 -1
  60. data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +1 -1
  61. data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +1 -1
  62. data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +1 -1
  63. data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +1 -1
  64. data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +20 -27
  65. data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +1 -1
  66. data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +1 -1
  67. data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +11 -11
  68. data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +8 -21
  69. data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +1 -1
  70. data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +1 -1
  71. data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +1 -1
  72. data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +1 -1
  73. data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +10 -1
  74. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
  75. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +1 -1
  76. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
  77. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +1 -1
  78. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +1 -1
  79. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
  80. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +1 -1
  81. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +43 -12
  82. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
  83. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -1
  84. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +1 -1
  85. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +1 -1
  86. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +1 -1
  87. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +1 -1
  88. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +1 -1
  89. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +1 -1
  90. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +11 -1
  91. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +1 -1
  92. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +1 -1
  93. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +1 -1
  94. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +1 -1
  95. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +1 -1
  96. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +1 -1
  97. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +1 -1
  98. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +1 -1
  99. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +1 -1
  100. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +1 -1
  101. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +1 -1
  102. data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +1 -1
  103. data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +1 -1
  104. data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +1 -1
  105. data/lib/azure_mgmt_compute/models/virtual_machine_size_types.rb +12 -1
  106. data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +1 -1
  107. data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +1 -1
  108. data/lib/azure_mgmt_compute/models/win_rmlistener.rb +1 -1
  109. data/lib/azure_mgmt_compute/models/windows_configuration.rb +1 -1
  110. data/lib/azure_mgmt_compute/module_definition.rb +1 -1
  111. data/lib/azure_mgmt_compute/usage_operations.rb +71 -11
  112. data/lib/azure_mgmt_compute/version.rb +2 -2
  113. data/lib/azure_mgmt_compute/virtual_machine_extension_images.rb +123 -18
  114. data/lib/azure_mgmt_compute/virtual_machine_extensions.rb +132 -22
  115. data/lib/azure_mgmt_compute/virtual_machine_images.rb +197 -26
  116. data/lib/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +419 -79
  117. data/lib/azure_mgmt_compute/virtual_machine_scale_sets.rb +736 -147
  118. data/lib/azure_mgmt_compute/virtual_machine_sizes.rb +36 -64
  119. data/lib/azure_mgmt_compute/virtual_machines.rb +531 -200
  120. data/lib/azure_mgmt_compute.rb +3 -6
  121. metadata +26 -24
  122. data/lib/azure_mgmt_compute/models/compute_long_running_operation_result.rb +0 -123
  123. data/lib/azure_mgmt_compute/models/compute_operation_status.rb +0 -18
  124. data/lib/azure_mgmt_compute/models/delete_operation_result.rb +0 -110
  125. data/lib/azure_mgmt_compute/models/operation_status.rb +0 -17
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -23,7 +23,8 @@ module Azure::ARM::Compute
23
23
  attr_reader :client
24
24
 
25
25
  #
26
- # The operation to create or update a virtual machine scale set.
26
+ # Allows you to create or update a virtual machine scale set by providing
27
+ # parameters or a path to pre-configured parameter file.
27
28
  #
28
29
  # @param resource_group_name [String] The name of the resource group.
29
30
  # @param name [String] Parameters supplied to the Create Virtual Machine Scale
@@ -42,7 +43,7 @@ module Azure::ARM::Compute
42
43
  #
43
44
  def create_or_update(resource_group_name, name, parameters, custom_headers = nil)
44
45
  # Send request
45
- promise = begin_create_or_update(resource_group_name, name, parameters, custom_headers)
46
+ promise = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers)
46
47
 
47
48
  promise = promise.then do |response|
48
49
  # Defining deserialization method.
@@ -53,27 +54,64 @@ module Azure::ARM::Compute
53
54
  end
54
55
 
55
56
  # Waiting for response.
56
- @client.get_put_operation_result(response, deserialize_method)
57
+ @client.get_long_running_operation_result(response, deserialize_method)
57
58
  end
58
59
 
59
60
  promise
60
61
  end
61
62
 
62
63
  #
63
- # The operation to create or update a virtual machine scale set.
64
+ # Allows you to create or update a virtual machine scale set by providing
65
+ # parameters or a path to pre-configured parameter file.
64
66
  #
65
67
  # @param resource_group_name [String] The name of the resource group.
66
68
  # @param name [String] Parameters supplied to the Create Virtual Machine Scale
67
69
  # Set operation.
68
70
  # @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
69
71
  # Virtual Machine Scale Set operation.
70
- # @param [Hash{String => String}] The hash of custom headers need to be
71
- # applied to HTTP request.
72
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
73
+ # will be added to the HTTP request.
72
74
  #
73
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
74
- # response.
75
+ # @return [VirtualMachineScaleSet] operation results.
75
76
  #
76
77
  def begin_create_or_update(resource_group_name, name, parameters, custom_headers = nil)
78
+ response = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
79
+ response.body unless response.nil?
80
+ end
81
+
82
+ #
83
+ # Allows you to create or update a virtual machine scale set by providing
84
+ # parameters or a path to pre-configured parameter file.
85
+ #
86
+ # @param resource_group_name [String] The name of the resource group.
87
+ # @param name [String] Parameters supplied to the Create Virtual Machine Scale
88
+ # Set operation.
89
+ # @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
90
+ # Virtual Machine Scale Set operation.
91
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
92
+ # will be added to the HTTP request.
93
+ #
94
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
95
+ #
96
+ def begin_create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
97
+ begin_create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
98
+ end
99
+
100
+ #
101
+ # Allows you to create or update a virtual machine scale set by providing
102
+ # parameters or a path to pre-configured parameter file.
103
+ #
104
+ # @param resource_group_name [String] The name of the resource group.
105
+ # @param name [String] Parameters supplied to the Create Virtual Machine Scale
106
+ # Set operation.
107
+ # @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
108
+ # Virtual Machine Scale Set operation.
109
+ # @param [Hash{String => String}] A hash of custom headers that will be added
110
+ # to the HTTP request.
111
+ #
112
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
113
+ #
114
+ def begin_create_or_update_async(resource_group_name, name, parameters, custom_headers = nil)
77
115
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
116
  fail ArgumentError, 'name is nil' if name.nil?
79
117
  fail ArgumentError, 'parameters is nil' if parameters.nil?
@@ -91,7 +129,7 @@ module Azure::ARM::Compute
91
129
  unless parameters.nil?
92
130
  parameters = VirtualMachineScaleSet.serialize_object(parameters)
93
131
  end
94
- request_content = JSON.generate(parameters, quirks_mode: true)
132
+ request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
95
133
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}'
96
134
  options = {
97
135
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -100,7 +138,10 @@ module Azure::ARM::Compute
100
138
  body: request_content,
101
139
  headers: request_headers.merge(custom_headers || {})
102
140
  }
103
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
141
+
142
+ request_url = @base_url || @client.base_url
143
+
144
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
104
145
  promise = request.run_promise do |req|
105
146
  @client.credentials.sign_request(req) unless @client.credentials.nil?
106
147
  end
@@ -148,7 +189,10 @@ module Azure::ARM::Compute
148
189
  end
149
190
 
150
191
  #
151
- # The operation to deallocate virtual machines in a virtual machine scale set.
192
+ # Allows you to deallocate virtual machines in a virtual machine scale set.
193
+ # Shuts down the virtual machines and releases the compute resources. You are
194
+ # not billed for the compute resources that this virtual machine scale set
195
+ # uses.
152
196
  #
153
197
  # @param resource_group_name [String] The name of the resource group.
154
198
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -159,7 +203,7 @@ module Azure::ARM::Compute
159
203
  #
160
204
  def deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
161
205
  # Send request
162
- promise = begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
206
+ promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
163
207
 
164
208
  promise = promise.then do |response|
165
209
  # Defining deserialization method.
@@ -167,26 +211,66 @@ module Azure::ARM::Compute
167
211
  end
168
212
 
169
213
  # Waiting for response.
170
- @client.get_post_or_delete_operation_result(response, deserialize_method)
214
+ @client.get_long_running_operation_result(response, deserialize_method)
171
215
  end
172
216
 
173
217
  promise
174
218
  end
175
219
 
176
220
  #
177
- # The operation to deallocate virtual machines in a virtual machine scale set.
221
+ # Allows you to deallocate virtual machines in a virtual machine scale set.
222
+ # Shuts down the virtual machines and releases the compute resources. You are
223
+ # not billed for the compute resources that this virtual machine scale set
224
+ # uses.
178
225
  #
179
226
  # @param resource_group_name [String] The name of the resource group.
180
227
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
181
228
  # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
182
229
  # virtual machine scale set instance IDs.
183
- # @param [Hash{String => String}] The hash of custom headers need to be
184
- # applied to HTTP request.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
185
232
  #
186
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
187
- # response.
188
233
  #
189
234
  def begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
235
+ response = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
236
+ nil
237
+ end
238
+
239
+ #
240
+ # Allows you to deallocate virtual machines in a virtual machine scale set.
241
+ # Shuts down the virtual machines and releases the compute resources. You are
242
+ # not billed for the compute resources that this virtual machine scale set
243
+ # uses.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group.
246
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
247
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
248
+ # virtual machine scale set instance IDs.
249
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
250
+ # will be added to the HTTP request.
251
+ #
252
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
253
+ #
254
+ def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
255
+ begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
256
+ end
257
+
258
+ #
259
+ # Allows you to deallocate virtual machines in a virtual machine scale set.
260
+ # Shuts down the virtual machines and releases the compute resources. You are
261
+ # not billed for the compute resources that this virtual machine scale set
262
+ # uses.
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group.
265
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
266
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
267
+ # virtual machine scale set instance IDs.
268
+ # @param [Hash{String => String}] A hash of custom headers that will be added
269
+ # to the HTTP request.
270
+ #
271
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
272
+ #
273
+ def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
190
274
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
191
275
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
192
276
  vm_instance_ids.validate unless vm_instance_ids.nil?
@@ -203,7 +287,7 @@ module Azure::ARM::Compute
203
287
  unless vm_instance_ids.nil?
204
288
  vm_instance_ids = VirtualMachineScaleSetVMInstanceIDs.serialize_object(vm_instance_ids)
205
289
  end
206
- request_content = JSON.generate(vm_instance_ids, quirks_mode: true)
290
+ request_content = vm_instance_ids != nil ? JSON.generate(vm_instance_ids, quirks_mode: true) : nil
207
291
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
208
292
  options = {
209
293
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -212,7 +296,10 @@ module Azure::ARM::Compute
212
296
  body: request_content,
213
297
  headers: request_headers.merge(custom_headers || {})
214
298
  }
215
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
299
+
300
+ request_url = @base_url || @client.base_url
301
+
302
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
216
303
  promise = request.run_promise do |req|
217
304
  @client.credentials.sign_request(req) unless @client.credentials.nil?
218
305
  end
@@ -236,7 +323,7 @@ module Azure::ARM::Compute
236
323
  end
237
324
 
238
325
  #
239
- # The operation to delete a virtual machine scale set.
326
+ # Allows you to delete a virtual machine scale set.
240
327
  #
241
328
  # @param resource_group_name [String] The name of the resource group.
242
329
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -245,7 +332,7 @@ module Azure::ARM::Compute
245
332
  #
246
333
  def delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
247
334
  # Send request
248
- promise = begin_delete(resource_group_name, vm_scale_set_name, custom_headers)
335
+ promise = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers)
249
336
 
250
337
  promise = promise.then do |response|
251
338
  # Defining deserialization method.
@@ -253,24 +340,51 @@ module Azure::ARM::Compute
253
340
  end
254
341
 
255
342
  # Waiting for response.
256
- @client.get_post_or_delete_operation_result(response, deserialize_method)
343
+ @client.get_long_running_operation_result(response, deserialize_method)
257
344
  end
258
345
 
259
346
  promise
260
347
  end
261
348
 
262
349
  #
263
- # The operation to delete a virtual machine scale set.
350
+ # Allows you to delete a virtual machine scale set.
264
351
  #
265
352
  # @param resource_group_name [String] The name of the resource group.
266
353
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
267
- # @param [Hash{String => String}] The hash of custom headers need to be
268
- # applied to HTTP request.
354
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
355
+ # will be added to the HTTP request.
269
356
  #
270
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
271
- # response.
272
357
  #
273
358
  def begin_delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
359
+ response = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
360
+ nil
361
+ end
362
+
363
+ #
364
+ # Allows you to delete a virtual machine scale set.
365
+ #
366
+ # @param resource_group_name [String] The name of the resource group.
367
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
372
+ #
373
+ def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
374
+ begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
375
+ end
376
+
377
+ #
378
+ # Allows you to delete a virtual machine scale set.
379
+ #
380
+ # @param resource_group_name [String] The name of the resource group.
381
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
382
+ # @param [Hash{String => String}] A hash of custom headers that will be added
383
+ # to the HTTP request.
384
+ #
385
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
386
+ #
387
+ def begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
274
388
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
275
389
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
276
390
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -287,7 +401,10 @@ module Azure::ARM::Compute
287
401
  query_params: {'api-version' => @client.api_version},
288
402
  headers: request_headers.merge(custom_headers || {})
289
403
  }
290
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
404
+
405
+ request_url = @base_url || @client.base_url
406
+
407
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
291
408
  promise = request.run_promise do |req|
292
409
  @client.credentials.sign_request(req) unless @client.credentials.nil?
293
410
  end
@@ -311,17 +428,45 @@ module Azure::ARM::Compute
311
428
  end
312
429
 
313
430
  #
314
- # The operation to get a virtual machine scale set.
431
+ # Display information about a virtual machine scale set.
315
432
  #
316
433
  # @param resource_group_name [String] The name of the resource group.
317
434
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
318
- # @param [Hash{String => String}] The hash of custom headers need to be
319
- # applied to HTTP request.
435
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
436
+ # will be added to the HTTP request.
320
437
  #
321
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
322
- # response.
438
+ # @return [VirtualMachineScaleSet] operation results.
323
439
  #
324
440
  def get(resource_group_name, vm_scale_set_name, custom_headers = nil)
441
+ response = get_async(resource_group_name, vm_scale_set_name, custom_headers).value!
442
+ response.body unless response.nil?
443
+ end
444
+
445
+ #
446
+ # Display information about a virtual machine scale set.
447
+ #
448
+ # @param resource_group_name [String] The name of the resource group.
449
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
451
+ # will be added to the HTTP request.
452
+ #
453
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
454
+ #
455
+ def get_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
456
+ get_async(resource_group_name, vm_scale_set_name, custom_headers).value!
457
+ end
458
+
459
+ #
460
+ # Display information about a virtual machine scale set.
461
+ #
462
+ # @param resource_group_name [String] The name of the resource group.
463
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
464
+ # @param [Hash{String => String}] A hash of custom headers that will be added
465
+ # to the HTTP request.
466
+ #
467
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
468
+ #
469
+ def get_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
325
470
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
326
471
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
327
472
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -338,7 +483,10 @@ module Azure::ARM::Compute
338
483
  query_params: {'api-version' => @client.api_version},
339
484
  headers: request_headers.merge(custom_headers || {})
340
485
  }
341
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
486
+
487
+ request_url = @base_url || @client.base_url
488
+
489
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
342
490
  promise = request.run_promise do |req|
343
491
  @client.credentials.sign_request(req) unless @client.credentials.nil?
344
492
  end
@@ -374,7 +522,7 @@ module Azure::ARM::Compute
374
522
  end
375
523
 
376
524
  #
377
- # The operation to delete virtual machines in a virtual machine scale set.
525
+ # Allows you to delete virtual machines in a virtual machine scale set.
378
526
  #
379
527
  # @param resource_group_name [String] The name of the resource group.
380
528
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -385,7 +533,7 @@ module Azure::ARM::Compute
385
533
  #
386
534
  def delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
387
535
  # Send request
388
- promise = begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
536
+ promise = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
389
537
 
390
538
  promise = promise.then do |response|
391
539
  # Defining deserialization method.
@@ -393,26 +541,57 @@ module Azure::ARM::Compute
393
541
  end
394
542
 
395
543
  # Waiting for response.
396
- @client.get_post_or_delete_operation_result(response, deserialize_method)
544
+ @client.get_long_running_operation_result(response, deserialize_method)
397
545
  end
398
546
 
399
547
  promise
400
548
  end
401
549
 
402
550
  #
403
- # The operation to delete virtual machines in a virtual machine scale set.
551
+ # Allows you to delete virtual machines in a virtual machine scale set.
404
552
  #
405
553
  # @param resource_group_name [String] The name of the resource group.
406
554
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
407
555
  # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
408
556
  # list of virtual machine scale set instance IDs.
409
- # @param [Hash{String => String}] The hash of custom headers need to be
410
- # applied to HTTP request.
557
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
558
+ # will be added to the HTTP request.
411
559
  #
412
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
413
- # response.
414
560
  #
415
561
  def begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
562
+ response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
563
+ nil
564
+ end
565
+
566
+ #
567
+ # Allows you to delete virtual machines in a virtual machine scale set.
568
+ #
569
+ # @param resource_group_name [String] The name of the resource group.
570
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
571
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
572
+ # list of virtual machine scale set instance IDs.
573
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
574
+ # will be added to the HTTP request.
575
+ #
576
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
577
+ #
578
+ def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
579
+ begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
580
+ end
581
+
582
+ #
583
+ # Allows you to delete virtual machines in a virtual machine scale set.
584
+ #
585
+ # @param resource_group_name [String] The name of the resource group.
586
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
587
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
588
+ # list of virtual machine scale set instance IDs.
589
+ # @param [Hash{String => String}] A hash of custom headers that will be added
590
+ # to the HTTP request.
591
+ #
592
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
593
+ #
594
+ def begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
416
595
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
417
596
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
418
597
  fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
@@ -430,7 +609,7 @@ module Azure::ARM::Compute
430
609
  unless vm_instance_ids.nil?
431
610
  vm_instance_ids = VirtualMachineScaleSetVMInstanceRequiredIDs.serialize_object(vm_instance_ids)
432
611
  end
433
- request_content = JSON.generate(vm_instance_ids, quirks_mode: true)
612
+ request_content = vm_instance_ids != nil ? JSON.generate(vm_instance_ids, quirks_mode: true) : nil
434
613
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'
435
614
  options = {
436
615
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -439,7 +618,10 @@ module Azure::ARM::Compute
439
618
  body: request_content,
440
619
  headers: request_headers.merge(custom_headers || {})
441
620
  }
442
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
621
+
622
+ request_url = @base_url || @client.base_url
623
+
624
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
443
625
  promise = request.run_promise do |req|
444
626
  @client.credentials.sign_request(req) unless @client.credentials.nil?
445
627
  end
@@ -463,17 +645,45 @@ module Azure::ARM::Compute
463
645
  end
464
646
 
465
647
  #
466
- # The operation to get a virtual machine scale set instance view.
648
+ # Displays status of a virtual machine scale set instance.
467
649
  #
468
650
  # @param resource_group_name [String] The name of the resource group.
469
651
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
470
- # @param [Hash{String => String}] The hash of custom headers need to be
471
- # applied to HTTP request.
652
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
653
+ # will be added to the HTTP request.
472
654
  #
473
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
474
- # response.
655
+ # @return [VirtualMachineScaleSetInstanceView] operation results.
475
656
  #
476
657
  def get_instance_view(resource_group_name, vm_scale_set_name, custom_headers = nil)
658
+ response = get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers).value!
659
+ response.body unless response.nil?
660
+ end
661
+
662
+ #
663
+ # Displays status of a virtual machine scale set instance.
664
+ #
665
+ # @param resource_group_name [String] The name of the resource group.
666
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
667
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
668
+ # will be added to the HTTP request.
669
+ #
670
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
671
+ #
672
+ def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
673
+ get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers).value!
674
+ end
675
+
676
+ #
677
+ # Displays status of a virtual machine scale set instance.
678
+ #
679
+ # @param resource_group_name [String] The name of the resource group.
680
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
681
+ # @param [Hash{String => String}] A hash of custom headers that will be added
682
+ # to the HTTP request.
683
+ #
684
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
685
+ #
686
+ def get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
477
687
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
478
688
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
479
689
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -490,7 +700,10 @@ module Azure::ARM::Compute
490
700
  query_params: {'api-version' => @client.api_version},
491
701
  headers: request_headers.merge(custom_headers || {})
492
702
  }
493
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
703
+
704
+ request_url = @base_url || @client.base_url
705
+
706
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
494
707
  promise = request.run_promise do |req|
495
708
  @client.credentials.sign_request(req) unless @client.credentials.nil?
496
709
  end
@@ -526,16 +739,42 @@ module Azure::ARM::Compute
526
739
  end
527
740
 
528
741
  #
529
- # The operation to list virtual machine scale sets under a resource group.
742
+ # Lists all virtual machine scale sets under a resource group.
530
743
  #
531
744
  # @param resource_group_name [String] The name of the resource group.
532
- # @param [Hash{String => String}] The hash of custom headers need to be
533
- # applied to HTTP request.
745
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
746
+ # will be added to the HTTP request.
534
747
  #
535
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
536
- # response.
748
+ # @return [VirtualMachineScaleSetListResult] operation results.
537
749
  #
538
750
  def list(resource_group_name, custom_headers = nil)
751
+ response = list_async(resource_group_name, custom_headers).value!
752
+ response.body unless response.nil?
753
+ end
754
+
755
+ #
756
+ # Lists all virtual machine scale sets under a resource group.
757
+ #
758
+ # @param resource_group_name [String] The name of the resource group.
759
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
760
+ # will be added to the HTTP request.
761
+ #
762
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
763
+ #
764
+ def list_with_http_info(resource_group_name, custom_headers = nil)
765
+ list_async(resource_group_name, custom_headers).value!
766
+ end
767
+
768
+ #
769
+ # Lists all virtual machine scale sets under a resource group.
770
+ #
771
+ # @param resource_group_name [String] The name of the resource group.
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 list_async(resource_group_name, custom_headers = nil)
539
778
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
540
779
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
541
780
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -551,7 +790,10 @@ module Azure::ARM::Compute
551
790
  query_params: {'api-version' => @client.api_version},
552
791
  headers: request_headers.merge(custom_headers || {})
553
792
  }
554
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
793
+
794
+ request_url = @base_url || @client.base_url
795
+
796
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
555
797
  promise = request.run_promise do |req|
556
798
  @client.credentials.sign_request(req) unless @client.credentials.nil?
557
799
  end
@@ -587,18 +829,48 @@ module Azure::ARM::Compute
587
829
  end
588
830
 
589
831
  #
590
- # Gets the list of Virtual Machine Scale Sets in the subscription. Use
591
- # nextLink property in the response to get the next page of Virtual Machine
592
- # Scale Sets. Do this till nextLink is not null to fetch all the Virtual
593
- # Machine Scale Sets.
832
+ # Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
833
+ # property in the response to get the next page of Virtual Machine Scale
834
+ # Sets. Do this till nextLink is not null to fetch all the Virtual Machine
835
+ # Scale Sets.
594
836
  #
595
- # @param [Hash{String => String}] The hash of custom headers need to be
596
- # applied to HTTP request.
837
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
838
+ # will be added to the HTTP request.
597
839
  #
598
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
599
- # response.
840
+ # @return [VirtualMachineScaleSetListWithLinkResult] operation results.
600
841
  #
601
842
  def list_all(custom_headers = nil)
843
+ response = list_all_async(custom_headers).value!
844
+ response.body unless response.nil?
845
+ end
846
+
847
+ #
848
+ # Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
849
+ # property in the response to get the next page of Virtual Machine Scale
850
+ # Sets. Do this till nextLink is not null to fetch all the Virtual Machine
851
+ # Scale Sets.
852
+ #
853
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
854
+ # will be added to the HTTP request.
855
+ #
856
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
857
+ #
858
+ def list_all_with_http_info(custom_headers = nil)
859
+ list_all_async(custom_headers).value!
860
+ end
861
+
862
+ #
863
+ # Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
864
+ # property in the response to get the next page of Virtual Machine Scale
865
+ # Sets. Do this till nextLink is not null to fetch all the Virtual Machine
866
+ # Scale Sets.
867
+ #
868
+ # @param [Hash{String => String}] A hash of custom headers that will be added
869
+ # to the HTTP request.
870
+ #
871
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
872
+ #
873
+ def list_all_async(custom_headers = nil)
602
874
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
603
875
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
604
876
  request_headers = {}
@@ -613,7 +885,10 @@ module Azure::ARM::Compute
613
885
  query_params: {'api-version' => @client.api_version},
614
886
  headers: request_headers.merge(custom_headers || {})
615
887
  }
616
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
888
+
889
+ request_url = @base_url || @client.base_url
890
+
891
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
617
892
  promise = request.run_promise do |req|
618
893
  @client.credentials.sign_request(req) unless @client.credentials.nil?
619
894
  end
@@ -649,17 +924,48 @@ module Azure::ARM::Compute
649
924
  end
650
925
 
651
926
  #
652
- # The operation to list available skus for a virtual machine scale set.
927
+ # Displays available skus for your virtual machine scale set including the
928
+ # minimum and maximum vm instances allowed for a particular sku.
653
929
  #
654
930
  # @param resource_group_name [String] The name of the resource group.
655
931
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
656
- # @param [Hash{String => String}] The hash of custom headers need to be
657
- # applied to HTTP request.
932
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
933
+ # will be added to the HTTP request.
658
934
  #
659
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
660
- # response.
935
+ # @return [VirtualMachineScaleSetListSkusResult] operation results.
661
936
  #
662
937
  def list_skus(resource_group_name, vm_scale_set_name, custom_headers = nil)
938
+ response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
939
+ response.body unless response.nil?
940
+ end
941
+
942
+ #
943
+ # Displays available skus for your virtual machine scale set including the
944
+ # minimum and maximum vm instances allowed for a particular sku.
945
+ #
946
+ # @param resource_group_name [String] The name of the resource group.
947
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
948
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
949
+ # will be added to the HTTP request.
950
+ #
951
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
952
+ #
953
+ def list_skus_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
954
+ list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
955
+ end
956
+
957
+ #
958
+ # Displays available skus for your virtual machine scale set including the
959
+ # minimum and maximum vm instances allowed for a particular sku.
960
+ #
961
+ # @param resource_group_name [String] The name of the resource group.
962
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
963
+ # @param [Hash{String => String}] A hash of custom headers that will be added
964
+ # to the HTTP request.
965
+ #
966
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
967
+ #
968
+ def list_skus_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
663
969
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
664
970
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
665
971
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -676,7 +982,10 @@ module Azure::ARM::Compute
676
982
  query_params: {'api-version' => @client.api_version},
677
983
  headers: request_headers.merge(custom_headers || {})
678
984
  }
679
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
985
+
986
+ request_url = @base_url || @client.base_url
987
+
988
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
680
989
  promise = request.run_promise do |req|
681
990
  @client.credentials.sign_request(req) unless @client.credentials.nil?
682
991
  end
@@ -712,8 +1021,9 @@ module Azure::ARM::Compute
712
1021
  end
713
1022
 
714
1023
  #
715
- # The operation to power off (stop) virtual machines in a virtual machine
716
- # scale set.
1024
+ # Allows you to power off (stop) virtual machines in a virtual machine scale
1025
+ # set. Note that resources are still attached and you are getting charged for
1026
+ # the resources. Use deallocate to release resources.
717
1027
  #
718
1028
  # @param resource_group_name [String] The name of the resource group.
719
1029
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -724,7 +1034,7 @@ module Azure::ARM::Compute
724
1034
  #
725
1035
  def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
726
1036
  # Send request
727
- promise = begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
1037
+ promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
728
1038
 
729
1039
  promise = promise.then do |response|
730
1040
  # Defining deserialization method.
@@ -732,27 +1042,63 @@ module Azure::ARM::Compute
732
1042
  end
733
1043
 
734
1044
  # Waiting for response.
735
- @client.get_post_or_delete_operation_result(response, deserialize_method)
1045
+ @client.get_long_running_operation_result(response, deserialize_method)
736
1046
  end
737
1047
 
738
1048
  promise
739
1049
  end
740
1050
 
741
1051
  #
742
- # The operation to power off (stop) virtual machines in a virtual machine
743
- # scale set.
1052
+ # Allows you to power off (stop) virtual machines in a virtual machine scale
1053
+ # set. Note that resources are still attached and you are getting charged for
1054
+ # the resources. Use deallocate to release resources.
744
1055
  #
745
1056
  # @param resource_group_name [String] The name of the resource group.
746
1057
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
747
1058
  # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
748
1059
  # virtual machine scale set instance IDs.
749
- # @param [Hash{String => String}] The hash of custom headers need to be
750
- # applied to HTTP request.
1060
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1061
+ # will be added to the HTTP request.
751
1062
  #
752
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
753
- # response.
754
1063
  #
755
1064
  def begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1065
+ response = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1066
+ nil
1067
+ end
1068
+
1069
+ #
1070
+ # Allows you to power off (stop) virtual machines in a virtual machine scale
1071
+ # set. Note that resources are still attached and you are getting charged for
1072
+ # the resources. Use deallocate to release resources.
1073
+ #
1074
+ # @param resource_group_name [String] The name of the resource group.
1075
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1076
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
1077
+ # virtual machine scale set instance IDs.
1078
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1079
+ # will be added to the HTTP request.
1080
+ #
1081
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1082
+ #
1083
+ def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1084
+ begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1085
+ end
1086
+
1087
+ #
1088
+ # Allows you to power off (stop) virtual machines in a virtual machine scale
1089
+ # set. Note that resources are still attached and you are getting charged for
1090
+ # the resources. Use deallocate to release resources.
1091
+ #
1092
+ # @param resource_group_name [String] The name of the resource group.
1093
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1094
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
1095
+ # virtual machine scale set instance IDs.
1096
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1097
+ # to the HTTP request.
1098
+ #
1099
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1100
+ #
1101
+ def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
756
1102
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
757
1103
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
758
1104
  vm_instance_ids.validate unless vm_instance_ids.nil?
@@ -769,7 +1115,7 @@ module Azure::ARM::Compute
769
1115
  unless vm_instance_ids.nil?
770
1116
  vm_instance_ids = VirtualMachineScaleSetVMInstanceIDs.serialize_object(vm_instance_ids)
771
1117
  end
772
- request_content = JSON.generate(vm_instance_ids, quirks_mode: true)
1118
+ request_content = vm_instance_ids != nil ? JSON.generate(vm_instance_ids, quirks_mode: true) : nil
773
1119
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'
774
1120
  options = {
775
1121
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -778,7 +1124,10 @@ module Azure::ARM::Compute
778
1124
  body: request_content,
779
1125
  headers: request_headers.merge(custom_headers || {})
780
1126
  }
781
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
1127
+
1128
+ request_url = @base_url || @client.base_url
1129
+
1130
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
782
1131
  promise = request.run_promise do |req|
783
1132
  @client.credentials.sign_request(req) unless @client.credentials.nil?
784
1133
  end
@@ -802,7 +1151,7 @@ module Azure::ARM::Compute
802
1151
  end
803
1152
 
804
1153
  #
805
- # The operation to restart virtual machines in a virtual machine scale set.
1154
+ # Allows you to restart virtual machines in a virtual machine scale set.
806
1155
  #
807
1156
  # @param resource_group_name [String] The name of the resource group.
808
1157
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -813,7 +1162,7 @@ module Azure::ARM::Compute
813
1162
  #
814
1163
  def restart(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
815
1164
  # Send request
816
- promise = begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
1165
+ promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
817
1166
 
818
1167
  promise = promise.then do |response|
819
1168
  # Defining deserialization method.
@@ -821,26 +1170,57 @@ module Azure::ARM::Compute
821
1170
  end
822
1171
 
823
1172
  # Waiting for response.
824
- @client.get_post_or_delete_operation_result(response, deserialize_method)
1173
+ @client.get_long_running_operation_result(response, deserialize_method)
825
1174
  end
826
1175
 
827
1176
  promise
828
1177
  end
829
1178
 
830
1179
  #
831
- # The operation to restart virtual machines in a virtual machine scale set.
1180
+ # Allows you to restart virtual machines in a virtual machine scale set.
832
1181
  #
833
1182
  # @param resource_group_name [String] The name of the resource group.
834
1183
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
835
1184
  # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
836
1185
  # virtual machine scale set instance IDs.
837
- # @param [Hash{String => String}] The hash of custom headers need to be
838
- # applied to HTTP request.
1186
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1187
+ # will be added to the HTTP request.
839
1188
  #
840
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
841
- # response.
842
1189
  #
843
1190
  def begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1191
+ response = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1192
+ nil
1193
+ end
1194
+
1195
+ #
1196
+ # Allows you to restart virtual machines in a virtual machine scale set.
1197
+ #
1198
+ # @param resource_group_name [String] The name of the resource group.
1199
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1200
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
1201
+ # virtual machine scale set instance IDs.
1202
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1203
+ # will be added to the HTTP request.
1204
+ #
1205
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1206
+ #
1207
+ def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1208
+ begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1209
+ end
1210
+
1211
+ #
1212
+ # Allows you to restart virtual machines in a virtual machine scale set.
1213
+ #
1214
+ # @param resource_group_name [String] The name of the resource group.
1215
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1216
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
1217
+ # virtual machine scale set instance IDs.
1218
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1219
+ # to the HTTP request.
1220
+ #
1221
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1222
+ #
1223
+ def begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
844
1224
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
845
1225
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
846
1226
  vm_instance_ids.validate unless vm_instance_ids.nil?
@@ -857,7 +1237,7 @@ module Azure::ARM::Compute
857
1237
  unless vm_instance_ids.nil?
858
1238
  vm_instance_ids = VirtualMachineScaleSetVMInstanceIDs.serialize_object(vm_instance_ids)
859
1239
  end
860
- request_content = JSON.generate(vm_instance_ids, quirks_mode: true)
1240
+ request_content = vm_instance_ids != nil ? JSON.generate(vm_instance_ids, quirks_mode: true) : nil
861
1241
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'
862
1242
  options = {
863
1243
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -866,7 +1246,10 @@ module Azure::ARM::Compute
866
1246
  body: request_content,
867
1247
  headers: request_headers.merge(custom_headers || {})
868
1248
  }
869
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
1249
+
1250
+ request_url = @base_url || @client.base_url
1251
+
1252
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
870
1253
  promise = request.run_promise do |req|
871
1254
  @client.credentials.sign_request(req) unless @client.credentials.nil?
872
1255
  end
@@ -890,7 +1273,7 @@ module Azure::ARM::Compute
890
1273
  end
891
1274
 
892
1275
  #
893
- # The operation to start virtual machines in a virtual machine scale set.
1276
+ # Allows you to start virtual machines in a virtual machine scale set.
894
1277
  #
895
1278
  # @param resource_group_name [String] The name of the resource group.
896
1279
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -901,7 +1284,7 @@ module Azure::ARM::Compute
901
1284
  #
902
1285
  def start(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
903
1286
  # Send request
904
- promise = begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
1287
+ promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
905
1288
 
906
1289
  promise = promise.then do |response|
907
1290
  # Defining deserialization method.
@@ -909,26 +1292,57 @@ module Azure::ARM::Compute
909
1292
  end
910
1293
 
911
1294
  # Waiting for response.
912
- @client.get_post_or_delete_operation_result(response, deserialize_method)
1295
+ @client.get_long_running_operation_result(response, deserialize_method)
913
1296
  end
914
1297
 
915
1298
  promise
916
1299
  end
917
1300
 
918
1301
  #
919
- # The operation to start virtual machines in a virtual machine scale set.
1302
+ # Allows you to start virtual machines in a virtual machine scale set.
920
1303
  #
921
1304
  # @param resource_group_name [String] The name of the resource group.
922
1305
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
923
1306
  # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
924
1307
  # virtual machine scale set instance IDs.
925
- # @param [Hash{String => String}] The hash of custom headers need to be
926
- # applied to HTTP request.
1308
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1309
+ # will be added to the HTTP request.
927
1310
  #
928
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
929
- # response.
930
1311
  #
931
1312
  def begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1313
+ response = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1314
+ nil
1315
+ end
1316
+
1317
+ #
1318
+ # Allows you to start virtual machines in a virtual machine scale set.
1319
+ #
1320
+ # @param resource_group_name [String] The name of the resource group.
1321
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1322
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
1323
+ # virtual machine scale set instance IDs.
1324
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1325
+ # will be added to the HTTP request.
1326
+ #
1327
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1328
+ #
1329
+ def begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
1330
+ begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1331
+ end
1332
+
1333
+ #
1334
+ # Allows you to start virtual machines in a virtual machine scale set.
1335
+ #
1336
+ # @param resource_group_name [String] The name of the resource group.
1337
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1338
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
1339
+ # virtual machine scale set instance IDs.
1340
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1341
+ # to the HTTP request.
1342
+ #
1343
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1344
+ #
1345
+ def begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
932
1346
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
933
1347
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
934
1348
  vm_instance_ids.validate unless vm_instance_ids.nil?
@@ -945,7 +1359,7 @@ module Azure::ARM::Compute
945
1359
  unless vm_instance_ids.nil?
946
1360
  vm_instance_ids = VirtualMachineScaleSetVMInstanceIDs.serialize_object(vm_instance_ids)
947
1361
  end
948
- request_content = JSON.generate(vm_instance_ids, quirks_mode: true)
1362
+ request_content = vm_instance_ids != nil ? JSON.generate(vm_instance_ids, quirks_mode: true) : nil
949
1363
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'
950
1364
  options = {
951
1365
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -954,7 +1368,10 @@ module Azure::ARM::Compute
954
1368
  body: request_content,
955
1369
  headers: request_headers.merge(custom_headers || {})
956
1370
  }
957
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
1371
+
1372
+ request_url = @base_url || @client.base_url
1373
+
1374
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
958
1375
  promise = request.run_promise do |req|
959
1376
  @client.credentials.sign_request(req) unless @client.credentials.nil?
960
1377
  end
@@ -978,8 +1395,8 @@ module Azure::ARM::Compute
978
1395
  end
979
1396
 
980
1397
  #
981
- # The operation to manually upgrade virtual machines in a virtual machine
982
- # scale set.
1398
+ # Allows you to manually upgrade virtual machines in a virtual machine scale
1399
+ # set.
983
1400
  #
984
1401
  # @param resource_group_name [String] The name of the resource group.
985
1402
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -990,7 +1407,7 @@ module Azure::ARM::Compute
990
1407
  #
991
1408
  def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
992
1409
  # Send request
993
- promise = begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
1410
+ promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
994
1411
 
995
1412
  promise = promise.then do |response|
996
1413
  # Defining deserialization method.
@@ -998,27 +1415,60 @@ module Azure::ARM::Compute
998
1415
  end
999
1416
 
1000
1417
  # Waiting for response.
1001
- @client.get_post_or_delete_operation_result(response, deserialize_method)
1418
+ @client.get_long_running_operation_result(response, deserialize_method)
1002
1419
  end
1003
1420
 
1004
1421
  promise
1005
1422
  end
1006
1423
 
1007
1424
  #
1008
- # The operation to manually upgrade virtual machines in a virtual machine
1009
- # scale set.
1425
+ # Allows you to manually upgrade virtual machines in a virtual machine scale
1426
+ # set.
1010
1427
  #
1011
1428
  # @param resource_group_name [String] The name of the resource group.
1012
1429
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1013
1430
  # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
1014
1431
  # list of virtual machine scale set instance IDs.
1015
- # @param [Hash{String => String}] The hash of custom headers need to be
1016
- # applied to HTTP request.
1432
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1433
+ # will be added to the HTTP request.
1017
1434
  #
1018
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
1019
- # response.
1020
1435
  #
1021
1436
  def begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1437
+ response = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1438
+ nil
1439
+ end
1440
+
1441
+ #
1442
+ # Allows you to manually upgrade virtual machines in a virtual machine scale
1443
+ # set.
1444
+ #
1445
+ # @param resource_group_name [String] The name of the resource group.
1446
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1447
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
1448
+ # list of virtual machine scale set instance IDs.
1449
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1450
+ # will be added to the HTTP request.
1451
+ #
1452
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1453
+ #
1454
+ def begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1455
+ begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
1456
+ end
1457
+
1458
+ #
1459
+ # Allows you to manually upgrade virtual machines in a virtual machine scale
1460
+ # set.
1461
+ #
1462
+ # @param resource_group_name [String] The name of the resource group.
1463
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1464
+ # @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
1465
+ # list of virtual machine scale set instance IDs.
1466
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1467
+ # to the HTTP request.
1468
+ #
1469
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1470
+ #
1471
+ def begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
1022
1472
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1023
1473
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1024
1474
  fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
@@ -1036,7 +1486,7 @@ module Azure::ARM::Compute
1036
1486
  unless vm_instance_ids.nil?
1037
1487
  vm_instance_ids = VirtualMachineScaleSetVMInstanceRequiredIDs.serialize_object(vm_instance_ids)
1038
1488
  end
1039
- request_content = JSON.generate(vm_instance_ids, quirks_mode: true)
1489
+ request_content = vm_instance_ids != nil ? JSON.generate(vm_instance_ids, quirks_mode: true) : nil
1040
1490
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'
1041
1491
  options = {
1042
1492
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -1045,7 +1495,10 @@ module Azure::ARM::Compute
1045
1495
  body: request_content,
1046
1496
  headers: request_headers.merge(custom_headers || {})
1047
1497
  }
1048
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
1498
+
1499
+ request_url = @base_url || @client.base_url
1500
+
1501
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1049
1502
  promise = request.run_promise do |req|
1050
1503
  @client.credentials.sign_request(req) unless @client.credentials.nil?
1051
1504
  end
@@ -1069,7 +1522,8 @@ module Azure::ARM::Compute
1069
1522
  end
1070
1523
 
1071
1524
  #
1072
- # The operation to re-image virtual machines in a virtual machine scale set.
1525
+ # Allows you to re-image(update the version of the installed operating system)
1526
+ # virtual machines in a virtual machine scale set.
1073
1527
  #
1074
1528
  # @param resource_group_name [String] The name of the resource group.
1075
1529
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
@@ -1078,7 +1532,7 @@ module Azure::ARM::Compute
1078
1532
  #
1079
1533
  def reimage(resource_group_name, vm_scale_set_name, custom_headers = nil)
1080
1534
  # Send request
1081
- promise = begin_reimage(resource_group_name, vm_scale_set_name, custom_headers)
1535
+ promise = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers)
1082
1536
 
1083
1537
  promise = promise.then do |response|
1084
1538
  # Defining deserialization method.
@@ -1086,24 +1540,54 @@ module Azure::ARM::Compute
1086
1540
  end
1087
1541
 
1088
1542
  # Waiting for response.
1089
- @client.get_post_or_delete_operation_result(response, deserialize_method)
1543
+ @client.get_long_running_operation_result(response, deserialize_method)
1090
1544
  end
1091
1545
 
1092
1546
  promise
1093
1547
  end
1094
1548
 
1095
1549
  #
1096
- # The operation to re-image virtual machines in a virtual machine scale set.
1550
+ # Allows you to re-image(update the version of the installed operating system)
1551
+ # virtual machines in a virtual machine scale set.
1097
1552
  #
1098
1553
  # @param resource_group_name [String] The name of the resource group.
1099
1554
  # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1100
- # @param [Hash{String => String}] The hash of custom headers need to be
1101
- # applied to HTTP request.
1555
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1556
+ # will be added to the HTTP request.
1102
1557
  #
1103
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
1104
- # response.
1105
1558
  #
1106
1559
  def begin_reimage(resource_group_name, vm_scale_set_name, custom_headers = nil)
1560
+ response = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
1561
+ nil
1562
+ end
1563
+
1564
+ #
1565
+ # Allows you to re-image(update the version of the installed operating system)
1566
+ # virtual machines in a virtual machine scale set.
1567
+ #
1568
+ # @param resource_group_name [String] The name of the resource group.
1569
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1570
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1571
+ # will be added to the HTTP request.
1572
+ #
1573
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1574
+ #
1575
+ def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
1576
+ begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
1577
+ end
1578
+
1579
+ #
1580
+ # Allows you to re-image(update the version of the installed operating system)
1581
+ # virtual machines in a virtual machine scale set.
1582
+ #
1583
+ # @param resource_group_name [String] The name of the resource group.
1584
+ # @param vm_scale_set_name [String] The name of the virtual machine scale set.
1585
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1586
+ # to the HTTP request.
1587
+ #
1588
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1589
+ #
1590
+ def begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
1107
1591
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1108
1592
  fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
1109
1593
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -1120,7 +1604,10 @@ module Azure::ARM::Compute
1120
1604
  query_params: {'api-version' => @client.api_version},
1121
1605
  headers: request_headers.merge(custom_headers || {})
1122
1606
  }
1123
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
1607
+
1608
+ request_url = @base_url || @client.base_url
1609
+
1610
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
1124
1611
  promise = request.run_promise do |req|
1125
1612
  @client.credentials.sign_request(req) unless @client.credentials.nil?
1126
1613
  end
@@ -1144,17 +1631,45 @@ module Azure::ARM::Compute
1144
1631
  end
1145
1632
 
1146
1633
  #
1147
- # The operation to list virtual machine scale sets under a resource group.
1634
+ # Lists all virtual machine scale sets under a resource group.
1148
1635
  #
1149
1636
  # @param next_page_link [String] The NextLink from the previous successful
1150
1637
  # call to List operation.
1151
- # @param [Hash{String => String}] The hash of custom headers need to be
1152
- # applied to HTTP request.
1638
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1639
+ # will be added to the HTTP request.
1153
1640
  #
1154
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
1155
- # response.
1641
+ # @return [VirtualMachineScaleSetListResult] operation results.
1156
1642
  #
1157
1643
  def list_next(next_page_link, custom_headers = nil)
1644
+ response = list_next_async(next_page_link, custom_headers).value!
1645
+ response.body unless response.nil?
1646
+ end
1647
+
1648
+ #
1649
+ # Lists all virtual machine scale sets under a resource group.
1650
+ #
1651
+ # @param next_page_link [String] The NextLink from the previous successful
1652
+ # call to List operation.
1653
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1654
+ # will be added to the HTTP request.
1655
+ #
1656
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1657
+ #
1658
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
1659
+ list_next_async(next_page_link, custom_headers).value!
1660
+ end
1661
+
1662
+ #
1663
+ # Lists all virtual machine scale sets under a resource group.
1664
+ #
1665
+ # @param next_page_link [String] The NextLink from the previous successful
1666
+ # call to List operation.
1667
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1668
+ # to the HTTP request.
1669
+ #
1670
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1671
+ #
1672
+ def list_next_async(next_page_link, custom_headers = nil)
1158
1673
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1159
1674
  request_headers = {}
1160
1675
 
@@ -1167,7 +1682,10 @@ module Azure::ARM::Compute
1167
1682
  skip_encoding_path_params: {'nextLink' => next_page_link},
1168
1683
  headers: request_headers.merge(custom_headers || {})
1169
1684
  }
1170
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
1685
+
1686
+ request_url = @base_url || @client.base_url
1687
+
1688
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1171
1689
  promise = request.run_promise do |req|
1172
1690
  @client.credentials.sign_request(req) unless @client.credentials.nil?
1173
1691
  end
@@ -1203,20 +1721,54 @@ module Azure::ARM::Compute
1203
1721
  end
1204
1722
 
1205
1723
  #
1206
- # Gets the list of Virtual Machine Scale Sets in the subscription. Use
1207
- # nextLink property in the response to get the next page of Virtual Machine
1208
- # Scale Sets. Do this till nextLink is not null to fetch all the Virtual
1209
- # Machine Scale Sets.
1724
+ # Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
1725
+ # property in the response to get the next page of Virtual Machine Scale
1726
+ # Sets. Do this till nextLink is not null to fetch all the Virtual Machine
1727
+ # Scale Sets.
1210
1728
  #
1211
1729
  # @param next_page_link [String] The NextLink from the previous successful
1212
1730
  # call to List operation.
1213
- # @param [Hash{String => String}] The hash of custom headers need to be
1214
- # applied to HTTP request.
1731
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1732
+ # will be added to the HTTP request.
1215
1733
  #
1216
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
1217
- # response.
1734
+ # @return [VirtualMachineScaleSetListWithLinkResult] operation results.
1218
1735
  #
1219
1736
  def list_all_next(next_page_link, custom_headers = nil)
1737
+ response = list_all_next_async(next_page_link, custom_headers).value!
1738
+ response.body unless response.nil?
1739
+ end
1740
+
1741
+ #
1742
+ # Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
1743
+ # property in the response to get the next page of Virtual Machine Scale
1744
+ # Sets. Do this till nextLink is not null to fetch all the Virtual Machine
1745
+ # Scale Sets.
1746
+ #
1747
+ # @param next_page_link [String] The NextLink from the previous successful
1748
+ # call to List operation.
1749
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1750
+ # will be added to the HTTP request.
1751
+ #
1752
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1753
+ #
1754
+ def list_all_next_with_http_info(next_page_link, custom_headers = nil)
1755
+ list_all_next_async(next_page_link, custom_headers).value!
1756
+ end
1757
+
1758
+ #
1759
+ # Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
1760
+ # property in the response to get the next page of Virtual Machine Scale
1761
+ # Sets. Do this till nextLink is not null to fetch all the Virtual Machine
1762
+ # Scale Sets.
1763
+ #
1764
+ # @param next_page_link [String] The NextLink from the previous successful
1765
+ # call to List operation.
1766
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1767
+ # to the HTTP request.
1768
+ #
1769
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1770
+ #
1771
+ def list_all_next_async(next_page_link, custom_headers = nil)
1220
1772
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1221
1773
  request_headers = {}
1222
1774
 
@@ -1229,7 +1781,10 @@ module Azure::ARM::Compute
1229
1781
  skip_encoding_path_params: {'nextLink' => next_page_link},
1230
1782
  headers: request_headers.merge(custom_headers || {})
1231
1783
  }
1232
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
1784
+
1785
+ request_url = @base_url || @client.base_url
1786
+
1787
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1233
1788
  promise = request.run_promise do |req|
1234
1789
  @client.credentials.sign_request(req) unless @client.credentials.nil?
1235
1790
  end
@@ -1265,17 +1820,48 @@ module Azure::ARM::Compute
1265
1820
  end
1266
1821
 
1267
1822
  #
1268
- # The operation to list available skus for a virtual machine scale set.
1823
+ # Displays available skus for your virtual machine scale set including the
1824
+ # minimum and maximum vm instances allowed for a particular sku.
1269
1825
  #
1270
1826
  # @param next_page_link [String] The NextLink from the previous successful
1271
1827
  # call to List operation.
1272
- # @param [Hash{String => String}] The hash of custom headers need to be
1273
- # applied to HTTP request.
1828
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1829
+ # will be added to the HTTP request.
1274
1830
  #
1275
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
1276
- # response.
1831
+ # @return [VirtualMachineScaleSetListSkusResult] operation results.
1277
1832
  #
1278
1833
  def list_skus_next(next_page_link, custom_headers = nil)
1834
+ response = list_skus_next_async(next_page_link, custom_headers).value!
1835
+ response.body unless response.nil?
1836
+ end
1837
+
1838
+ #
1839
+ # Displays available skus for your virtual machine scale set including the
1840
+ # minimum and maximum vm instances allowed for a particular sku.
1841
+ #
1842
+ # @param next_page_link [String] The NextLink from the previous successful
1843
+ # call to List operation.
1844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1845
+ # will be added to the HTTP request.
1846
+ #
1847
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1848
+ #
1849
+ def list_skus_next_with_http_info(next_page_link, custom_headers = nil)
1850
+ list_skus_next_async(next_page_link, custom_headers).value!
1851
+ end
1852
+
1853
+ #
1854
+ # Displays available skus for your virtual machine scale set including the
1855
+ # minimum and maximum vm instances allowed for a particular sku.
1856
+ #
1857
+ # @param next_page_link [String] The NextLink from the previous successful
1858
+ # call to List operation.
1859
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1860
+ # to the HTTP request.
1861
+ #
1862
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1863
+ #
1864
+ def list_skus_next_async(next_page_link, custom_headers = nil)
1279
1865
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1280
1866
  request_headers = {}
1281
1867
 
@@ -1288,7 +1874,10 @@ module Azure::ARM::Compute
1288
1874
  skip_encoding_path_params: {'nextLink' => next_page_link},
1289
1875
  headers: request_headers.merge(custom_headers || {})
1290
1876
  }
1291
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
1877
+
1878
+ request_url = @base_url || @client.base_url
1879
+
1880
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
1292
1881
  promise = request.run_promise do |req|
1293
1882
  @client.credentials.sign_request(req) unless @client.credentials.nil?
1294
1883
  end