azure_mgmt_compute 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/azure_mgmt_compute.gemspec +4 -4
- data/lib/azure_mgmt_compute.rb +3 -138
- data/lib/generated/azure_mgmt_compute.rb +128 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/availability_sets.rb +24 -22
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/compute_management_client.rb +12 -12
- data/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +88 -0
- data/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb +45 -0
- data/lib/generated/azure_mgmt_compute/models/api_error.rb +93 -0
- data/lib/generated/azure_mgmt_compute/models/api_error_base.rb +64 -0
- data/lib/generated/azure_mgmt_compute/models/availability_set.rb +136 -0
- data/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +54 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/caching_types.rb +0 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/component_names.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +44 -0
- data/lib/generated/azure_mgmt_compute/models/data_disk.rb +114 -0
- data/lib/generated/azure_mgmt_compute/models/data_disk_image.rb +48 -0
- data/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb +45 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/disk_create_option_types.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +69 -0
- data/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb +62 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/hardware_profile.rb +20 -35
- data/lib/generated/azure_mgmt_compute/models/image_reference.rb +76 -0
- data/lib/generated/azure_mgmt_compute/models/inner_error.rb +54 -0
- data/lib/generated/azure_mgmt_compute/models/instance_view_status.rb +87 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/instance_view_types.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/linux_configuration.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/list_usages_result.rb +95 -0
- data/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb +51 -0
- data/lib/generated/azure_mgmt_compute/models/network_profile.rb +52 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/operating_system_types.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/osdisk.rb +127 -0
- data/lib/generated/azure_mgmt_compute/models/osdisk_image.rb +46 -0
- data/lib/generated/azure_mgmt_compute/models/osprofile.rb +116 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/pass_names.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/plan.rb +74 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/protocol_types.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/purchase_plan.rb +65 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/setting_names.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/sku.rb +64 -0
- data/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb +53 -0
- data/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb +59 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/status_level_types.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/storage_profile.rb +74 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/upgrade_mode.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb +46 -0
- data/lib/generated/azure_mgmt_compute/models/usage.rb +78 -0
- data/lib/generated/azure_mgmt_compute/models/usage_name.rb +54 -0
- data/lib/generated/azure_mgmt_compute/models/vault_certificate.rb +57 -0
- data/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb +65 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +45 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine.rb +224 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +81 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +65 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +51 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +175 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +67 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +134 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +101 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb +109 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +78 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +142 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +135 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +124 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +53 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +85 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +117 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +97 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +97 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +82 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +53 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +111 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +116 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +70 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +80 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/virtual_machine_scale_set_sku_scale_type.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +248 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +66 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +51 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +52 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +142 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +96 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +82 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb +95 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +52 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/models/virtual_machine_size_types.rb +0 -0
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +58 -0
- data/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +53 -0
- data/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb +58 -0
- data/lib/generated/azure_mgmt_compute/models/windows_configuration.rb +98 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/module_definition.rb +0 -0
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/usage_operations.rb +32 -11
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/version.rb +1 -1
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machine_extension_images.rb +40 -26
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machine_extensions.rb +59 -31
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machine_images.rb +76 -48
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machine_scale_set_vms.rb +169 -41
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machine_scale_sets.rb +341 -125
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machine_sizes.rb +4 -4
- data/lib/{azure_mgmt_compute → generated/azure_mgmt_compute}/virtual_machines.rb +340 -84
- metadata +126 -142
- data/lib/azure_mgmt_compute/models/additional_unattend_content.rb +0 -105
- data/lib/azure_mgmt_compute/models/api_entity_reference.rb +0 -57
- data/lib/azure_mgmt_compute/models/api_error.rb +0 -119
- data/lib/azure_mgmt_compute/models/api_error_base.rb +0 -74
- data/lib/azure_mgmt_compute/models/availability_set.rb +0 -92
- data/lib/azure_mgmt_compute/models/availability_set_list_result.rb +0 -77
- data/lib/azure_mgmt_compute/models/availability_set_properties.rb +0 -128
- data/lib/azure_mgmt_compute/models/boot_diagnostics.rb +0 -67
- data/lib/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +0 -65
- data/lib/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +0 -56
- data/lib/azure_mgmt_compute/models/data_disk.rb +0 -143
- data/lib/azure_mgmt_compute/models/data_disk_image.rb +0 -60
- data/lib/azure_mgmt_compute/models/diagnostics_profile.rb +0 -62
- data/lib/azure_mgmt_compute/models/disk_encryption_settings.rb +0 -90
- data/lib/azure_mgmt_compute/models/disk_instance_view.rb +0 -86
- data/lib/azure_mgmt_compute/models/image_reference.rb +0 -85
- data/lib/azure_mgmt_compute/models/inner_error.rb +0 -66
- data/lib/azure_mgmt_compute/models/instance_view_status.rb +0 -100
- data/lib/azure_mgmt_compute/models/key_vault_key_reference.rb +0 -74
- data/lib/azure_mgmt_compute/models/key_vault_secret_reference.rb +0 -75
- data/lib/azure_mgmt_compute/models/linux_configuration.rb +0 -73
- data/lib/azure_mgmt_compute/models/list_usages_result.rb +0 -76
- data/lib/azure_mgmt_compute/models/network_interface_reference.rb +0 -68
- data/lib/azure_mgmt_compute/models/network_interface_reference_properties.rb +0 -57
- data/lib/azure_mgmt_compute/models/network_profile.rb +0 -77
- data/lib/azure_mgmt_compute/models/osdisk.rb +0 -163
- data/lib/azure_mgmt_compute/models/osdisk_image.rb +0 -61
- data/lib/azure_mgmt_compute/models/osprofile.rb +0 -147
- data/lib/azure_mgmt_compute/models/plan.rb +0 -83
- data/lib/azure_mgmt_compute/models/purchase_plan.rb +0 -77
- data/lib/azure_mgmt_compute/models/sku.rb +0 -75
- data/lib/azure_mgmt_compute/models/ssh_configuration.rb +0 -77
- data/lib/azure_mgmt_compute/models/ssh_public_key.rb +0 -70
- data/lib/azure_mgmt_compute/models/storage_profile.rb +0 -108
- data/lib/azure_mgmt_compute/models/upgrade_policy.rb +0 -60
- data/lib/azure_mgmt_compute/models/usage.rb +0 -96
- data/lib/azure_mgmt_compute/models/usage_name.rb +0 -66
- data/lib/azure_mgmt_compute/models/vault_certificate.rb +0 -68
- data/lib/azure_mgmt_compute/models/vault_secret_group.rb +0 -94
- data/lib/azure_mgmt_compute/models/virtual_hard_disk.rb +0 -57
- data/lib/azure_mgmt_compute/models/virtual_machine.rb +0 -140
- data/lib/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +0 -117
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +0 -78
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result.rb +0 -68
- data/lib/azure_mgmt_compute/models/virtual_machine_capture_result_properties.rb +0 -56
- data/lib/azure_mgmt_compute/models/virtual_machine_extension.rb +0 -92
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +0 -83
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image.rb +0 -92
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_image_properties.rb +0 -102
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +0 -137
- data/lib/azure_mgmt_compute/models/virtual_machine_extension_properties.rb +0 -141
- data/lib/azure_mgmt_compute/models/virtual_machine_image.rb +0 -86
- data/lib/azure_mgmt_compute/models/virtual_machine_image_properties.rb +0 -108
- data/lib/azure_mgmt_compute/models/virtual_machine_image_resource.rb +0 -83
- data/lib/azure_mgmt_compute/models/virtual_machine_instance_view.rb +0 -202
- data/lib/azure_mgmt_compute/models/virtual_machine_list_result.rb +0 -87
- data/lib/azure_mgmt_compute/models/virtual_machine_properties.rb +0 -189
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set.rb +0 -108
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_extension_properties.rb +0 -116
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +0 -125
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +0 -79
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +0 -78
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration_properties.rb +0 -158
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +0 -88
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +0 -80
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration_properties.rb +0 -89
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +0 -129
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +0 -147
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_properties.rb +0 -99
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +0 -88
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +0 -90
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +0 -78
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +0 -165
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +0 -87
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +0 -57
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +0 -59
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +0 -202
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +0 -114
- data/lib/azure_mgmt_compute/models/virtual_machine_scale_set_vmproperties.rb +0 -190
- data/lib/azure_mgmt_compute/models/virtual_machine_size.rb +0 -109
- data/lib/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +0 -77
- data/lib/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +0 -68
- data/lib/azure_mgmt_compute/models/win_rmconfiguration.rb +0 -77
- data/lib/azure_mgmt_compute/models/win_rmlistener.rb +0 -71
- data/lib/azure_mgmt_compute/models/windows_configuration.rb +0 -124
@@ -31,26 +31,37 @@ module Azure::ARM::Compute
|
|
31
31
|
# Set operation.
|
32
32
|
# @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
|
33
33
|
# Virtual Machine Scale Set operation.
|
34
|
-
# @param
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
|
34
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
|
+
# will be added to the HTTP request.
|
36
|
+
#
|
37
|
+
# @return [VirtualMachineScaleSet] operation results.
|
38
|
+
#
|
39
|
+
def create_or_update(resource_group_name, name, parameters, custom_headers = nil)
|
40
|
+
response = create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
|
41
|
+
response.body unless response.nil?
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group.
|
46
|
+
# @param name [String] Parameters supplied to the Create Virtual Machine Scale
|
47
|
+
# Set operation.
|
48
|
+
# @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
|
49
|
+
# Virtual Machine Scale Set operation.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
40
52
|
#
|
41
53
|
# @return [Concurrent::Promise] promise which provides async access to http
|
42
54
|
# response.
|
43
55
|
#
|
44
|
-
def
|
56
|
+
def create_or_update_async(resource_group_name, name, parameters, custom_headers = nil)
|
45
57
|
# Send request
|
46
58
|
promise = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers)
|
47
59
|
|
48
60
|
promise = promise.then do |response|
|
49
61
|
# Defining deserialization method.
|
50
62
|
deserialize_method = lambda do |parsed_response|
|
51
|
-
|
52
|
-
|
53
|
-
end
|
63
|
+
result_mapper = VirtualMachineScaleSet.mapper()
|
64
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
54
65
|
end
|
55
66
|
|
56
67
|
# Waiting for response.
|
@@ -115,21 +126,23 @@ module Azure::ARM::Compute
|
|
115
126
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
116
127
|
fail ArgumentError, 'name is nil' if name.nil?
|
117
128
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
118
|
-
parameters.validate unless parameters.nil?
|
119
129
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
120
130
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
131
|
+
|
132
|
+
|
121
133
|
request_headers = {}
|
122
134
|
|
123
135
|
# Set Headers
|
124
136
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
125
137
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
126
138
|
|
127
|
-
# Serialize Request
|
128
139
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
request_content =
|
140
|
+
|
141
|
+
# Serialize Request
|
142
|
+
request_mapper = VirtualMachineScaleSet.mapper()
|
143
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
144
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
145
|
+
|
133
146
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}'
|
134
147
|
options = {
|
135
148
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -161,10 +174,8 @@ module Azure::ARM::Compute
|
|
161
174
|
if status_code == 200
|
162
175
|
begin
|
163
176
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
164
|
-
|
165
|
-
|
166
|
-
end
|
167
|
-
result.body = parsed_response
|
177
|
+
result_mapper = VirtualMachineScaleSet.mapper()
|
178
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
168
179
|
rescue Exception => e
|
169
180
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
170
181
|
end
|
@@ -173,10 +184,8 @@ module Azure::ARM::Compute
|
|
173
184
|
if status_code == 201
|
174
185
|
begin
|
175
186
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
176
|
-
|
177
|
-
|
178
|
-
end
|
179
|
-
result.body = parsed_response
|
187
|
+
result_mapper = VirtualMachineScaleSet.mapper()
|
188
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
180
189
|
rescue Exception => e
|
181
190
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
182
191
|
end
|
@@ -198,10 +207,26 @@ module Azure::ARM::Compute
|
|
198
207
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
199
208
|
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
200
209
|
# virtual machine scale set instance IDs.
|
210
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
211
|
+
# will be added to the HTTP request.
|
212
|
+
#
|
213
|
+
def deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
214
|
+
response = deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
215
|
+
nil
|
216
|
+
end
|
217
|
+
|
218
|
+
#
|
219
|
+
# @param resource_group_name [String] The name of the resource group.
|
220
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
221
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
222
|
+
# virtual machine scale set instance IDs.
|
223
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
224
|
+
# will be added to the HTTP request.
|
225
|
+
#
|
201
226
|
# @return [Concurrent::Promise] promise which provides async access to http
|
202
227
|
# response.
|
203
228
|
#
|
204
|
-
def
|
229
|
+
def deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
205
230
|
# Send request
|
206
231
|
promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
207
232
|
|
@@ -210,8 +235,8 @@ module Azure::ARM::Compute
|
|
210
235
|
deserialize_method = lambda do |parsed_response|
|
211
236
|
end
|
212
237
|
|
213
|
-
|
214
|
-
|
238
|
+
# Waiting for response.
|
239
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
215
240
|
end
|
216
241
|
|
217
242
|
promise
|
@@ -273,21 +298,23 @@ module Azure::ARM::Compute
|
|
273
298
|
def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
274
299
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
275
300
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
276
|
-
vm_instance_ids.validate unless vm_instance_ids.nil?
|
277
301
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
278
302
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
303
|
+
|
304
|
+
|
279
305
|
request_headers = {}
|
280
306
|
|
281
307
|
# Set Headers
|
282
308
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
283
309
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
284
310
|
|
285
|
-
# Serialize Request
|
286
311
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
request_content =
|
312
|
+
|
313
|
+
# Serialize Request
|
314
|
+
request_mapper = VirtualMachineScaleSetVMInstanceIDs.mapper()
|
315
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
316
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
317
|
+
|
291
318
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
|
292
319
|
options = {
|
293
320
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -327,10 +354,24 @@ module Azure::ARM::Compute
|
|
327
354
|
#
|
328
355
|
# @param resource_group_name [String] The name of the resource group.
|
329
356
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
357
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
358
|
+
# will be added to the HTTP request.
|
359
|
+
#
|
360
|
+
def delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
361
|
+
response = delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
362
|
+
nil
|
363
|
+
end
|
364
|
+
|
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
|
+
#
|
330
371
|
# @return [Concurrent::Promise] promise which provides async access to http
|
331
372
|
# response.
|
332
373
|
#
|
333
|
-
def
|
374
|
+
def delete_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
334
375
|
# Send request
|
335
376
|
promise = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers)
|
336
377
|
|
@@ -339,8 +380,8 @@ module Azure::ARM::Compute
|
|
339
380
|
deserialize_method = lambda do |parsed_response|
|
340
381
|
end
|
341
382
|
|
342
|
-
|
343
|
-
|
383
|
+
# Waiting for response.
|
384
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
344
385
|
end
|
345
386
|
|
346
387
|
promise
|
@@ -389,6 +430,8 @@ module Azure::ARM::Compute
|
|
389
430
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
390
431
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
391
432
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
433
|
+
|
434
|
+
|
392
435
|
request_headers = {}
|
393
436
|
|
394
437
|
# Set Headers
|
@@ -471,6 +514,8 @@ module Azure::ARM::Compute
|
|
471
514
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
472
515
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
473
516
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
517
|
+
|
518
|
+
|
474
519
|
request_headers = {}
|
475
520
|
|
476
521
|
# Set Headers
|
@@ -506,10 +551,8 @@ module Azure::ARM::Compute
|
|
506
551
|
if status_code == 200
|
507
552
|
begin
|
508
553
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
509
|
-
|
510
|
-
|
511
|
-
end
|
512
|
-
result.body = parsed_response
|
554
|
+
result_mapper = VirtualMachineScaleSet.mapper()
|
555
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
513
556
|
rescue Exception => e
|
514
557
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
515
558
|
end
|
@@ -528,10 +571,26 @@ module Azure::ARM::Compute
|
|
528
571
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
529
572
|
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
530
573
|
# list of virtual machine scale set instance IDs.
|
574
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
575
|
+
# will be added to the HTTP request.
|
576
|
+
#
|
577
|
+
def delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
578
|
+
response = delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
579
|
+
nil
|
580
|
+
end
|
581
|
+
|
582
|
+
#
|
583
|
+
# @param resource_group_name [String] The name of the resource group.
|
584
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
585
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
586
|
+
# list of virtual machine scale set instance IDs.
|
587
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
588
|
+
# will be added to the HTTP request.
|
589
|
+
#
|
531
590
|
# @return [Concurrent::Promise] promise which provides async access to http
|
532
591
|
# response.
|
533
592
|
#
|
534
|
-
def
|
593
|
+
def delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
535
594
|
# Send request
|
536
595
|
promise = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
537
596
|
|
@@ -540,8 +599,8 @@ module Azure::ARM::Compute
|
|
540
599
|
deserialize_method = lambda do |parsed_response|
|
541
600
|
end
|
542
601
|
|
543
|
-
|
544
|
-
|
602
|
+
# Waiting for response.
|
603
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
545
604
|
end
|
546
605
|
|
547
606
|
promise
|
@@ -595,21 +654,23 @@ module Azure::ARM::Compute
|
|
595
654
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
596
655
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
597
656
|
fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
|
598
|
-
vm_instance_ids.validate unless vm_instance_ids.nil?
|
599
657
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
600
658
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
659
|
+
|
660
|
+
|
601
661
|
request_headers = {}
|
602
662
|
|
603
663
|
# Set Headers
|
604
664
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
605
665
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
606
666
|
|
607
|
-
# Serialize Request
|
608
667
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
request_content =
|
668
|
+
|
669
|
+
# Serialize Request
|
670
|
+
request_mapper = VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
|
671
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
672
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
673
|
+
|
613
674
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'
|
614
675
|
options = {
|
615
676
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -688,6 +749,8 @@ module Azure::ARM::Compute
|
|
688
749
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
689
750
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
690
751
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
752
|
+
|
753
|
+
|
691
754
|
request_headers = {}
|
692
755
|
|
693
756
|
# Set Headers
|
@@ -723,10 +786,8 @@ module Azure::ARM::Compute
|
|
723
786
|
if status_code == 200
|
724
787
|
begin
|
725
788
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
726
|
-
|
727
|
-
|
728
|
-
end
|
729
|
-
result.body = parsed_response
|
789
|
+
result_mapper = VirtualMachineScaleSetInstanceView.mapper()
|
790
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
730
791
|
rescue Exception => e
|
731
792
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
732
793
|
end
|
@@ -745,11 +806,32 @@ module Azure::ARM::Compute
|
|
745
806
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
746
807
|
# will be added to the HTTP request.
|
747
808
|
#
|
748
|
-
# @return [VirtualMachineScaleSetListResult]
|
809
|
+
# @return [VirtualMachineScaleSetListResult] which provide lazy access to
|
810
|
+
# pages of the response.
|
749
811
|
#
|
750
|
-
def
|
812
|
+
def list_as_lazy(resource_group_name, custom_headers = nil)
|
751
813
|
response = list_async(resource_group_name, custom_headers).value!
|
752
|
-
|
814
|
+
unless response.nil?
|
815
|
+
page = response.body
|
816
|
+
page.next_method = Proc.new do |next_link|
|
817
|
+
list_next_async(next_link, custom_headers)
|
818
|
+
end
|
819
|
+
page
|
820
|
+
end
|
821
|
+
end
|
822
|
+
|
823
|
+
#
|
824
|
+
# Lists all virtual machine scale sets under a resource group.
|
825
|
+
#
|
826
|
+
# @param resource_group_name [String] The name of the resource group.
|
827
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
828
|
+
# will be added to the HTTP request.
|
829
|
+
#
|
830
|
+
# @return [Array<VirtualMachineScaleSet>] operation results.
|
831
|
+
#
|
832
|
+
def list(resource_group_name, custom_headers = nil)
|
833
|
+
first_page = list_as_lazy(resource_group_name, custom_headers)
|
834
|
+
first_page.get_all_items
|
753
835
|
end
|
754
836
|
|
755
837
|
#
|
@@ -778,6 +860,8 @@ module Azure::ARM::Compute
|
|
778
860
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
779
861
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
780
862
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
863
|
+
|
864
|
+
|
781
865
|
request_headers = {}
|
782
866
|
|
783
867
|
# Set Headers
|
@@ -813,10 +897,8 @@ module Azure::ARM::Compute
|
|
813
897
|
if status_code == 200
|
814
898
|
begin
|
815
899
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
816
|
-
|
817
|
-
|
818
|
-
end
|
819
|
-
result.body = parsed_response
|
900
|
+
result_mapper = VirtualMachineScaleSetListResult.mapper()
|
901
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
820
902
|
rescue Exception => e
|
821
903
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
822
904
|
end
|
@@ -837,11 +919,34 @@ module Azure::ARM::Compute
|
|
837
919
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
838
920
|
# will be added to the HTTP request.
|
839
921
|
#
|
840
|
-
# @return [VirtualMachineScaleSetListWithLinkResult]
|
922
|
+
# @return [VirtualMachineScaleSetListWithLinkResult] which provide lazy access
|
923
|
+
# to pages of the response.
|
841
924
|
#
|
842
|
-
def
|
925
|
+
def list_all_as_lazy(custom_headers = nil)
|
843
926
|
response = list_all_async(custom_headers).value!
|
844
|
-
|
927
|
+
unless response.nil?
|
928
|
+
page = response.body
|
929
|
+
page.next_method = Proc.new do |next_link|
|
930
|
+
list_all_next_async(next_link, custom_headers)
|
931
|
+
end
|
932
|
+
page
|
933
|
+
end
|
934
|
+
end
|
935
|
+
|
936
|
+
#
|
937
|
+
# Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
|
938
|
+
# property in the response to get the next page of Virtual Machine Scale
|
939
|
+
# Sets. Do this till nextLink is not null to fetch all the Virtual Machine
|
940
|
+
# Scale Sets.
|
941
|
+
#
|
942
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
943
|
+
# will be added to the HTTP request.
|
944
|
+
#
|
945
|
+
# @return [Array<VirtualMachineScaleSet>] operation results.
|
946
|
+
#
|
947
|
+
def list_all(custom_headers = nil)
|
948
|
+
first_page = list_all_as_lazy(custom_headers)
|
949
|
+
first_page.get_all_items
|
845
950
|
end
|
846
951
|
|
847
952
|
#
|
@@ -873,6 +978,8 @@ module Azure::ARM::Compute
|
|
873
978
|
def list_all_async(custom_headers = nil)
|
874
979
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
875
980
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
981
|
+
|
982
|
+
|
876
983
|
request_headers = {}
|
877
984
|
|
878
985
|
# Set Headers
|
@@ -908,10 +1015,8 @@ module Azure::ARM::Compute
|
|
908
1015
|
if status_code == 200
|
909
1016
|
begin
|
910
1017
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
911
|
-
|
912
|
-
|
913
|
-
end
|
914
|
-
result.body = parsed_response
|
1018
|
+
result_mapper = VirtualMachineScaleSetListWithLinkResult.mapper()
|
1019
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
915
1020
|
rescue Exception => e
|
916
1021
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
917
1022
|
end
|
@@ -932,11 +1037,34 @@ module Azure::ARM::Compute
|
|
932
1037
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
933
1038
|
# will be added to the HTTP request.
|
934
1039
|
#
|
935
|
-
# @return [VirtualMachineScaleSetListSkusResult]
|
1040
|
+
# @return [VirtualMachineScaleSetListSkusResult] which provide lazy access to
|
1041
|
+
# pages of the response.
|
936
1042
|
#
|
937
|
-
def
|
1043
|
+
def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
938
1044
|
response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
939
|
-
|
1045
|
+
unless response.nil?
|
1046
|
+
page = response.body
|
1047
|
+
page.next_method = Proc.new do |next_link|
|
1048
|
+
list_skus_next_async(next_link, custom_headers)
|
1049
|
+
end
|
1050
|
+
page
|
1051
|
+
end
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
#
|
1055
|
+
# Displays available skus for your virtual machine scale set including the
|
1056
|
+
# minimum and maximum vm instances allowed for a particular sku.
|
1057
|
+
#
|
1058
|
+
# @param resource_group_name [String] The name of the resource group.
|
1059
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1060
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1061
|
+
# will be added to the HTTP request.
|
1062
|
+
#
|
1063
|
+
# @return [Array<VirtualMachineScaleSetSku>] operation results.
|
1064
|
+
#
|
1065
|
+
def list_skus(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1066
|
+
first_page = list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers)
|
1067
|
+
first_page.get_all_items
|
940
1068
|
end
|
941
1069
|
|
942
1070
|
#
|
@@ -970,6 +1098,8 @@ module Azure::ARM::Compute
|
|
970
1098
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
971
1099
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
972
1100
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1101
|
+
|
1102
|
+
|
973
1103
|
request_headers = {}
|
974
1104
|
|
975
1105
|
# Set Headers
|
@@ -1005,10 +1135,8 @@ module Azure::ARM::Compute
|
|
1005
1135
|
if status_code == 200
|
1006
1136
|
begin
|
1007
1137
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1008
|
-
|
1009
|
-
|
1010
|
-
end
|
1011
|
-
result.body = parsed_response
|
1138
|
+
result_mapper = VirtualMachineScaleSetListSkusResult.mapper()
|
1139
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1012
1140
|
rescue Exception => e
|
1013
1141
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1014
1142
|
end
|
@@ -1029,10 +1157,26 @@ module Azure::ARM::Compute
|
|
1029
1157
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1030
1158
|
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1031
1159
|
# virtual machine scale set instance IDs.
|
1160
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1161
|
+
# will be added to the HTTP request.
|
1162
|
+
#
|
1163
|
+
def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1164
|
+
response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1165
|
+
nil
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
#
|
1169
|
+
# @param resource_group_name [String] The name of the resource group.
|
1170
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1171
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1172
|
+
# virtual machine scale set instance IDs.
|
1173
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1174
|
+
# will be added to the HTTP request.
|
1175
|
+
#
|
1032
1176
|
# @return [Concurrent::Promise] promise which provides async access to http
|
1033
1177
|
# response.
|
1034
1178
|
#
|
1035
|
-
def
|
1179
|
+
def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1036
1180
|
# Send request
|
1037
1181
|
promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1038
1182
|
|
@@ -1041,8 +1185,8 @@ module Azure::ARM::Compute
|
|
1041
1185
|
deserialize_method = lambda do |parsed_response|
|
1042
1186
|
end
|
1043
1187
|
|
1044
|
-
|
1045
|
-
|
1188
|
+
# Waiting for response.
|
1189
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1046
1190
|
end
|
1047
1191
|
|
1048
1192
|
promise
|
@@ -1101,21 +1245,23 @@ module Azure::ARM::Compute
|
|
1101
1245
|
def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1102
1246
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1103
1247
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1104
|
-
vm_instance_ids.validate unless vm_instance_ids.nil?
|
1105
1248
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1106
1249
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1250
|
+
|
1251
|
+
|
1107
1252
|
request_headers = {}
|
1108
1253
|
|
1109
1254
|
# Set Headers
|
1110
1255
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1111
1256
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1112
1257
|
|
1113
|
-
# Serialize Request
|
1114
1258
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
request_content =
|
1259
|
+
|
1260
|
+
# Serialize Request
|
1261
|
+
request_mapper = VirtualMachineScaleSetVMInstanceIDs.mapper()
|
1262
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
1263
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1264
|
+
|
1119
1265
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff'
|
1120
1266
|
options = {
|
1121
1267
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1157,10 +1303,26 @@ module Azure::ARM::Compute
|
|
1157
1303
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1158
1304
|
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1159
1305
|
# virtual machine scale set instance IDs.
|
1306
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1307
|
+
# will be added to the HTTP request.
|
1308
|
+
#
|
1309
|
+
def restart(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1310
|
+
response = restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1311
|
+
nil
|
1312
|
+
end
|
1313
|
+
|
1314
|
+
#
|
1315
|
+
# @param resource_group_name [String] The name of the resource group.
|
1316
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1317
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1318
|
+
# virtual machine scale set instance IDs.
|
1319
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1320
|
+
# will be added to the HTTP request.
|
1321
|
+
#
|
1160
1322
|
# @return [Concurrent::Promise] promise which provides async access to http
|
1161
1323
|
# response.
|
1162
1324
|
#
|
1163
|
-
def
|
1325
|
+
def restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1164
1326
|
# Send request
|
1165
1327
|
promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1166
1328
|
|
@@ -1169,8 +1331,8 @@ module Azure::ARM::Compute
|
|
1169
1331
|
deserialize_method = lambda do |parsed_response|
|
1170
1332
|
end
|
1171
1333
|
|
1172
|
-
|
1173
|
-
|
1334
|
+
# Waiting for response.
|
1335
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1174
1336
|
end
|
1175
1337
|
|
1176
1338
|
promise
|
@@ -1223,21 +1385,23 @@ module Azure::ARM::Compute
|
|
1223
1385
|
def begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1224
1386
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1225
1387
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1226
|
-
vm_instance_ids.validate unless vm_instance_ids.nil?
|
1227
1388
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1228
1389
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1390
|
+
|
1391
|
+
|
1229
1392
|
request_headers = {}
|
1230
1393
|
|
1231
1394
|
# Set Headers
|
1232
1395
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1233
1396
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1234
1397
|
|
1235
|
-
# Serialize Request
|
1236
1398
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
request_content =
|
1399
|
+
|
1400
|
+
# Serialize Request
|
1401
|
+
request_mapper = VirtualMachineScaleSetVMInstanceIDs.mapper()
|
1402
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
1403
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1404
|
+
|
1241
1405
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart'
|
1242
1406
|
options = {
|
1243
1407
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1279,10 +1443,26 @@ module Azure::ARM::Compute
|
|
1279
1443
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1280
1444
|
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1281
1445
|
# virtual machine scale set instance IDs.
|
1446
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1447
|
+
# will be added to the HTTP request.
|
1448
|
+
#
|
1449
|
+
def start(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1450
|
+
response = start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1451
|
+
nil
|
1452
|
+
end
|
1453
|
+
|
1454
|
+
#
|
1455
|
+
# @param resource_group_name [String] The name of the resource group.
|
1456
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1457
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1458
|
+
# virtual machine scale set instance IDs.
|
1459
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1460
|
+
# will be added to the HTTP request.
|
1461
|
+
#
|
1282
1462
|
# @return [Concurrent::Promise] promise which provides async access to http
|
1283
1463
|
# response.
|
1284
1464
|
#
|
1285
|
-
def
|
1465
|
+
def start_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1286
1466
|
# Send request
|
1287
1467
|
promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1288
1468
|
|
@@ -1291,8 +1471,8 @@ module Azure::ARM::Compute
|
|
1291
1471
|
deserialize_method = lambda do |parsed_response|
|
1292
1472
|
end
|
1293
1473
|
|
1294
|
-
|
1295
|
-
|
1474
|
+
# Waiting for response.
|
1475
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1296
1476
|
end
|
1297
1477
|
|
1298
1478
|
promise
|
@@ -1345,21 +1525,23 @@ module Azure::ARM::Compute
|
|
1345
1525
|
def begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1346
1526
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1347
1527
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1348
|
-
vm_instance_ids.validate unless vm_instance_ids.nil?
|
1349
1528
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1350
1529
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1530
|
+
|
1531
|
+
|
1351
1532
|
request_headers = {}
|
1352
1533
|
|
1353
1534
|
# Set Headers
|
1354
1535
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1355
1536
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1356
1537
|
|
1357
|
-
# Serialize Request
|
1358
1538
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
request_content =
|
1539
|
+
|
1540
|
+
# Serialize Request
|
1541
|
+
request_mapper = VirtualMachineScaleSetVMInstanceIDs.mapper()
|
1542
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
1543
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1544
|
+
|
1363
1545
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start'
|
1364
1546
|
options = {
|
1365
1547
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1402,10 +1584,26 @@ module Azure::ARM::Compute
|
|
1402
1584
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1403
1585
|
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
1404
1586
|
# list of virtual machine scale set instance IDs.
|
1587
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1588
|
+
# will be added to the HTTP request.
|
1589
|
+
#
|
1590
|
+
def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1591
|
+
response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1592
|
+
nil
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
#
|
1596
|
+
# @param resource_group_name [String] The name of the resource group.
|
1597
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1598
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
1599
|
+
# list of virtual machine scale set instance IDs.
|
1600
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1601
|
+
# will be added to the HTTP request.
|
1602
|
+
#
|
1405
1603
|
# @return [Concurrent::Promise] promise which provides async access to http
|
1406
1604
|
# response.
|
1407
1605
|
#
|
1408
|
-
def
|
1606
|
+
def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1409
1607
|
# Send request
|
1410
1608
|
promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1411
1609
|
|
@@ -1414,8 +1612,8 @@ module Azure::ARM::Compute
|
|
1414
1612
|
deserialize_method = lambda do |parsed_response|
|
1415
1613
|
end
|
1416
1614
|
|
1417
|
-
|
1418
|
-
|
1615
|
+
# Waiting for response.
|
1616
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1419
1617
|
end
|
1420
1618
|
|
1421
1619
|
promise
|
@@ -1472,21 +1670,23 @@ module Azure::ARM::Compute
|
|
1472
1670
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1473
1671
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1474
1672
|
fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
|
1475
|
-
vm_instance_ids.validate unless vm_instance_ids.nil?
|
1476
1673
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1477
1674
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1675
|
+
|
1676
|
+
|
1478
1677
|
request_headers = {}
|
1479
1678
|
|
1480
1679
|
# Set Headers
|
1481
1680
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1482
1681
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1483
1682
|
|
1484
|
-
# Serialize Request
|
1485
1683
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
request_content =
|
1684
|
+
|
1685
|
+
# Serialize Request
|
1686
|
+
request_mapper = VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
|
1687
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
1688
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1689
|
+
|
1490
1690
|
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade'
|
1491
1691
|
options = {
|
1492
1692
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
@@ -1527,10 +1727,24 @@ module Azure::ARM::Compute
|
|
1527
1727
|
#
|
1528
1728
|
# @param resource_group_name [String] The name of the resource group.
|
1529
1729
|
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1730
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1731
|
+
# will be added to the HTTP request.
|
1732
|
+
#
|
1733
|
+
def reimage(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1734
|
+
response = reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
1735
|
+
nil
|
1736
|
+
end
|
1737
|
+
|
1738
|
+
#
|
1739
|
+
# @param resource_group_name [String] The name of the resource group.
|
1740
|
+
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1741
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1742
|
+
# will be added to the HTTP request.
|
1743
|
+
#
|
1530
1744
|
# @return [Concurrent::Promise] promise which provides async access to http
|
1531
1745
|
# response.
|
1532
1746
|
#
|
1533
|
-
def
|
1747
|
+
def reimage_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1534
1748
|
# Send request
|
1535
1749
|
promise = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers)
|
1536
1750
|
|
@@ -1539,8 +1753,8 @@ module Azure::ARM::Compute
|
|
1539
1753
|
deserialize_method = lambda do |parsed_response|
|
1540
1754
|
end
|
1541
1755
|
|
1542
|
-
|
1543
|
-
|
1756
|
+
# Waiting for response.
|
1757
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
1544
1758
|
end
|
1545
1759
|
|
1546
1760
|
promise
|
@@ -1592,6 +1806,8 @@ module Azure::ARM::Compute
|
|
1592
1806
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1593
1807
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1594
1808
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1809
|
+
|
1810
|
+
|
1595
1811
|
request_headers = {}
|
1596
1812
|
|
1597
1813
|
# Set Headers
|
@@ -1671,6 +1887,8 @@ module Azure::ARM::Compute
|
|
1671
1887
|
#
|
1672
1888
|
def list_next_async(next_page_link, custom_headers = nil)
|
1673
1889
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1890
|
+
|
1891
|
+
|
1674
1892
|
request_headers = {}
|
1675
1893
|
|
1676
1894
|
# Set Headers
|
@@ -1705,10 +1923,8 @@ module Azure::ARM::Compute
|
|
1705
1923
|
if status_code == 200
|
1706
1924
|
begin
|
1707
1925
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1708
|
-
|
1709
|
-
|
1710
|
-
end
|
1711
|
-
result.body = parsed_response
|
1926
|
+
result_mapper = VirtualMachineScaleSetListResult.mapper()
|
1927
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1712
1928
|
rescue Exception => e
|
1713
1929
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1714
1930
|
end
|
@@ -1770,6 +1986,8 @@ module Azure::ARM::Compute
|
|
1770
1986
|
#
|
1771
1987
|
def list_all_next_async(next_page_link, custom_headers = nil)
|
1772
1988
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1989
|
+
|
1990
|
+
|
1773
1991
|
request_headers = {}
|
1774
1992
|
|
1775
1993
|
# Set Headers
|
@@ -1804,10 +2022,8 @@ module Azure::ARM::Compute
|
|
1804
2022
|
if status_code == 200
|
1805
2023
|
begin
|
1806
2024
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1807
|
-
|
1808
|
-
|
1809
|
-
end
|
1810
|
-
result.body = parsed_response
|
2025
|
+
result_mapper = VirtualMachineScaleSetListWithLinkResult.mapper()
|
2026
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1811
2027
|
rescue Exception => e
|
1812
2028
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1813
2029
|
end
|
@@ -1863,6 +2079,8 @@ module Azure::ARM::Compute
|
|
1863
2079
|
#
|
1864
2080
|
def list_skus_next_async(next_page_link, custom_headers = nil)
|
1865
2081
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
2082
|
+
|
2083
|
+
|
1866
2084
|
request_headers = {}
|
1867
2085
|
|
1868
2086
|
# Set Headers
|
@@ -1897,10 +2115,8 @@ module Azure::ARM::Compute
|
|
1897
2115
|
if status_code == 200
|
1898
2116
|
begin
|
1899
2117
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1900
|
-
|
1901
|
-
|
1902
|
-
end
|
1903
|
-
result.body = parsed_response
|
2118
|
+
result_mapper = VirtualMachineScaleSetListSkusResult.mapper()
|
2119
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1904
2120
|
rescue Exception => e
|
1905
2121
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1906
2122
|
end
|