azure_mgmt_compute 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_compute.rb +48 -46
- data/lib/generated/azure_mgmt_compute/availability_sets.rb +16 -19
- data/lib/generated/azure_mgmt_compute/compute_management_client.rb +18 -5
- data/lib/generated/azure_mgmt_compute/container_services.rb +920 -0
- data/lib/generated/azure_mgmt_compute/models/additional_unattend_content.rb +9 -10
- data/lib/generated/azure_mgmt_compute/models/api_entity_reference.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/api_error.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/api_error_base.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/availability_set.rb +6 -5
- data/lib/generated/azure_mgmt_compute/models/availability_set_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/boot_diagnostics.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/boot_diagnostics_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/caching_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/component_names.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/compute_long_running_operation_properties.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service.rb +36 -13
- data/lib/generated/azure_mgmt_compute/models/container_service_agent_pool_profile.rb +18 -16
- data/lib/generated/azure_mgmt_compute/models/container_service_custom_profile.rb +44 -0
- data/lib/generated/azure_mgmt_compute/models/container_service_diagnostics_profile.rb +5 -4
- data/lib/generated/azure_mgmt_compute/models/container_service_linux_profile.rb +8 -5
- data/lib/generated/azure_mgmt_compute/models/container_service_list_result.rb +45 -3
- data/lib/generated/azure_mgmt_compute/models/container_service_master_profile.rb +8 -5
- data/lib/generated/azure_mgmt_compute/models/container_service_ochestrator_types.rb +3 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_orchestrator_profile.rb +7 -6
- data/lib/generated/azure_mgmt_compute/models/container_service_service_principal_profile.rb +56 -0
- data/lib/generated/azure_mgmt_compute/models/container_service_ssh_configuration.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/container_service_ssh_public_key.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/container_service_vmdiagnostics.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/container_service_vmsize_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/container_service_windows_profile.rb +10 -4
- data/lib/generated/azure_mgmt_compute/models/data_disk.rb +12 -12
- data/lib/generated/azure_mgmt_compute/models/data_disk_image.rb +4 -5
- data/lib/generated/azure_mgmt_compute/models/diagnostics_profile.rb +4 -2
- data/lib/generated/azure_mgmt_compute/models/disk_create_option_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/disk_encryption_settings.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/disk_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/hardware_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/image_reference.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/inner_error.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/instance_view_status.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/instance_view_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/key_vault_key_reference.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/key_vault_secret_reference.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/linux_configuration.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/list_usages_result.rb +6 -6
- data/lib/generated/azure_mgmt_compute/models/network_interface_reference.rb +3 -2
- data/lib/generated/azure_mgmt_compute/models/network_profile.rb +4 -2
- data/lib/generated/azure_mgmt_compute/models/operating_system_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/osdisk.rb +12 -12
- data/lib/generated/azure_mgmt_compute/models/osdisk_image.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/osprofile.rb +12 -9
- data/lib/generated/azure_mgmt_compute/models/pass_names.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/plan.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/protocol_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/purchase_plan.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/setting_names.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/sku.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/ssh_configuration.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/ssh_public_key.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/status_level_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/storage_profile.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/upgrade_mode.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/upgrade_policy.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/usage.rb +6 -6
- data/lib/generated/azure_mgmt_compute/models/usage_name.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/vault_certificate.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/vault_secret_group.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_hard_disk.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine.rb +18 -15
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_agent_instance_view.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_parameters.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_capture_result.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_handler_instance_view.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_image.rb +5 -5
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_extension_instance_view.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_image.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_image_resource.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_instance_view.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_list_result.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_extension_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_instance_view_statuses_summary.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_ipconfiguration.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_skus_result.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_list_with_link_result.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_configuration.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_network_profile.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osdisk.rb +4 -4
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_osprofile.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_capacity.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_sku_scale_type.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_storage_profile.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vm.rb +7 -7
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmextensions_summary.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_ids.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_required_ids.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vminstance_view.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmlist_result.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_scale_set_vmprofile.rb +3 -3
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_size.rb +12 -8
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_size_list_result.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_size_types.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/virtual_machine_status_code_count.rb +1 -1
- data/lib/generated/azure_mgmt_compute/models/win_rmconfiguration.rb +2 -2
- data/lib/generated/azure_mgmt_compute/models/win_rmlistener.rb +5 -6
- data/lib/generated/azure_mgmt_compute/models/windows_configuration.rb +11 -10
- data/lib/generated/azure_mgmt_compute/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_compute/usage_operations.rb +51 -37
- data/lib/generated/azure_mgmt_compute/version.rb +2 -2
- data/lib/generated/azure_mgmt_compute/virtual_machine_extension_images.rb +1 -1
- data/lib/generated/azure_mgmt_compute/virtual_machine_extensions.rb +131 -131
- data/lib/generated/azure_mgmt_compute/virtual_machine_images.rb +70 -58
- data/lib/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb +430 -422
- data/lib/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb +729 -747
- data/lib/generated/azure_mgmt_compute/virtual_machine_sizes.rb +1 -1
- data/lib/generated/azure_mgmt_compute/virtual_machines.rb +526 -515
- metadata +7 -5
- data/lib/generated/azure_mgmt_compute/container_service_operations.rb +0 -508
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
@@ -23,14 +23,11 @@ module Azure::ARM::Compute
|
|
23
23
|
attr_reader :client
|
24
24
|
|
25
25
|
#
|
26
|
-
#
|
27
|
-
# parameters or a path to pre-configured parameter file.
|
26
|
+
# Create or update a VM scale set.
|
28
27
|
#
|
29
28
|
# @param resource_group_name [String] The name of the resource group.
|
30
|
-
# @param name [String]
|
31
|
-
#
|
32
|
-
# @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
|
33
|
-
# Virtual Machine Scale Set operation.
|
29
|
+
# @param name [String] The name of the VM scale set to create or update.
|
30
|
+
# @param parameters [VirtualMachineScaleSet] The scale set object.
|
34
31
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
35
32
|
# will be added to the HTTP request.
|
36
33
|
#
|
@@ -43,10 +40,8 @@ module Azure::ARM::Compute
|
|
43
40
|
|
44
41
|
#
|
45
42
|
# @param resource_group_name [String] The name of the resource group.
|
46
|
-
# @param name [String]
|
47
|
-
#
|
48
|
-
# @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
|
49
|
-
# Virtual Machine Scale Set operation.
|
43
|
+
# @param name [String] The name of the VM scale set to create or update.
|
44
|
+
# @param parameters [VirtualMachineScaleSet] The scale set object.
|
50
45
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
46
|
# will be added to the HTTP request.
|
52
47
|
#
|
@@ -72,60 +67,129 @@ module Azure::ARM::Compute
|
|
72
67
|
end
|
73
68
|
|
74
69
|
#
|
75
|
-
#
|
76
|
-
#
|
70
|
+
# Deallocates specific virtual machines in a VM scale set. Shuts down the
|
71
|
+
# virtual machines and releases the compute resources. You are not billed for
|
72
|
+
# the compute resources that this virtual machine scale set deallocates.
|
77
73
|
#
|
78
74
|
# @param resource_group_name [String] The name of the resource group.
|
79
|
-
# @param
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
75
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
76
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
77
|
+
# virtual machine instance IDs from the VM scale set.
|
78
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
79
|
+
# will be added to the HTTP request.
|
80
|
+
#
|
81
|
+
def deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
82
|
+
response = deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
83
|
+
nil
|
84
|
+
end
|
85
|
+
|
86
|
+
#
|
87
|
+
# @param resource_group_name [String] The name of the resource group.
|
88
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
89
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
90
|
+
# virtual machine instance IDs from the VM scale set.
|
91
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
92
|
+
# will be added to the HTTP request.
|
93
|
+
#
|
94
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
95
|
+
# response.
|
96
|
+
#
|
97
|
+
def deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
98
|
+
# Send request
|
99
|
+
promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
100
|
+
|
101
|
+
promise = promise.then do |response|
|
102
|
+
# Defining deserialization method.
|
103
|
+
deserialize_method = lambda do |parsed_response|
|
104
|
+
end
|
105
|
+
|
106
|
+
# Waiting for response.
|
107
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
108
|
+
end
|
109
|
+
|
110
|
+
promise
|
111
|
+
end
|
112
|
+
|
113
|
+
#
|
114
|
+
# Deletes a VM scale set.
|
115
|
+
#
|
116
|
+
# @param resource_group_name [String] The name of the resource group.
|
117
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
118
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
119
|
+
# will be added to the HTTP request.
|
120
|
+
#
|
121
|
+
def delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
122
|
+
response = delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
123
|
+
nil
|
124
|
+
end
|
125
|
+
|
126
|
+
#
|
127
|
+
# @param resource_group_name [String] The name of the resource group.
|
128
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
129
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
130
|
+
# will be added to the HTTP request.
|
131
|
+
#
|
132
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
133
|
+
# response.
|
134
|
+
#
|
135
|
+
def delete_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
136
|
+
# Send request
|
137
|
+
promise = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers)
|
138
|
+
|
139
|
+
promise = promise.then do |response|
|
140
|
+
# Defining deserialization method.
|
141
|
+
deserialize_method = lambda do |parsed_response|
|
142
|
+
end
|
143
|
+
|
144
|
+
# Waiting for response.
|
145
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
146
|
+
end
|
147
|
+
|
148
|
+
promise
|
149
|
+
end
|
150
|
+
|
151
|
+
#
|
152
|
+
# Display information about a virtual machine scale set.
|
153
|
+
#
|
154
|
+
# @param resource_group_name [String] The name of the resource group.
|
155
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
83
156
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
84
157
|
# will be added to the HTTP request.
|
85
158
|
#
|
86
159
|
# @return [VirtualMachineScaleSet] operation results.
|
87
160
|
#
|
88
|
-
def
|
89
|
-
response =
|
161
|
+
def get(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
162
|
+
response = get_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
90
163
|
response.body unless response.nil?
|
91
164
|
end
|
92
165
|
|
93
166
|
#
|
94
|
-
#
|
95
|
-
# parameters or a path to pre-configured parameter file.
|
167
|
+
# Display information about a virtual machine scale set.
|
96
168
|
#
|
97
169
|
# @param resource_group_name [String] The name of the resource group.
|
98
|
-
# @param
|
99
|
-
# Set operation.
|
100
|
-
# @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
|
101
|
-
# Virtual Machine Scale Set operation.
|
170
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
102
171
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
103
172
|
# will be added to the HTTP request.
|
104
173
|
#
|
105
174
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
106
175
|
#
|
107
|
-
def
|
108
|
-
|
176
|
+
def get_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
177
|
+
get_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
109
178
|
end
|
110
179
|
|
111
180
|
#
|
112
|
-
#
|
113
|
-
# parameters or a path to pre-configured parameter file.
|
181
|
+
# Display information about a virtual machine scale set.
|
114
182
|
#
|
115
183
|
# @param resource_group_name [String] The name of the resource group.
|
116
|
-
# @param
|
117
|
-
# Set operation.
|
118
|
-
# @param parameters [VirtualMachineScaleSet] Parameters supplied to the Create
|
119
|
-
# Virtual Machine Scale Set operation.
|
184
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
120
185
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
121
186
|
# to the HTTP request.
|
122
187
|
#
|
123
188
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
124
189
|
#
|
125
|
-
def
|
190
|
+
def get_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
126
191
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
127
|
-
fail ArgumentError, '
|
128
|
-
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
192
|
+
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
129
193
|
api_version = '2016-03-30'
|
130
194
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
131
195
|
|
@@ -135,33 +199,24 @@ module Azure::ARM::Compute
|
|
135
199
|
# Set Headers
|
136
200
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
137
201
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
138
|
-
|
139
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
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
|
-
|
146
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}'
|
202
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
|
147
203
|
|
148
204
|
request_url = @base_url || @client.base_url
|
149
205
|
|
150
206
|
options = {
|
151
207
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
152
|
-
path_params: {'resourceGroupName' => resource_group_name,'
|
208
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
153
209
|
query_params: {'api-version' => api_version},
|
154
|
-
body: request_content,
|
155
210
|
headers: request_headers.merge(custom_headers || {}),
|
156
211
|
base_url: request_url
|
157
212
|
}
|
158
|
-
promise = @client.make_request_async(:
|
213
|
+
promise = @client.make_request_async(:get, path_template, options)
|
159
214
|
|
160
215
|
promise = promise.then do |result|
|
161
216
|
http_response = result.response
|
162
217
|
status_code = http_response.status
|
163
218
|
response_content = http_response.body
|
164
|
-
unless status_code == 200
|
219
|
+
unless status_code == 200
|
165
220
|
error_model = JSON.load(response_content)
|
166
221
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
167
222
|
end
|
@@ -177,16 +232,6 @@ module Azure::ARM::Compute
|
|
177
232
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
178
233
|
end
|
179
234
|
end
|
180
|
-
# Deserialize Response
|
181
|
-
if status_code == 201
|
182
|
-
begin
|
183
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
184
|
-
result_mapper = VirtualMachineScaleSet.mapper()
|
185
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
186
|
-
rescue Exception => e
|
187
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
188
|
-
end
|
189
|
-
end
|
190
235
|
|
191
236
|
result
|
192
237
|
end
|
@@ -195,37 +240,34 @@ module Azure::ARM::Compute
|
|
195
240
|
end
|
196
241
|
|
197
242
|
#
|
198
|
-
#
|
199
|
-
# Shuts down the virtual machines and releases the compute resources. You are
|
200
|
-
# not billed for the compute resources that this virtual machine scale set
|
201
|
-
# uses.
|
243
|
+
# Deletes virtual machines in a VM scale set.
|
202
244
|
#
|
203
245
|
# @param resource_group_name [String] The name of the resource group.
|
204
|
-
# @param vm_scale_set_name [String] The name of the
|
205
|
-
# @param vm_instance_ids [
|
206
|
-
# virtual machine scale set
|
246
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
247
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
248
|
+
# of virtual machine instance IDs from the VM scale set.
|
207
249
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
208
250
|
# will be added to the HTTP request.
|
209
251
|
#
|
210
|
-
def
|
211
|
-
response =
|
252
|
+
def delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
253
|
+
response = delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
212
254
|
nil
|
213
255
|
end
|
214
256
|
|
215
257
|
#
|
216
258
|
# @param resource_group_name [String] The name of the resource group.
|
217
|
-
# @param vm_scale_set_name [String] The name of the
|
218
|
-
# @param vm_instance_ids [
|
219
|
-
# virtual machine scale set
|
259
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
260
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
261
|
+
# of virtual machine instance IDs from the VM scale set.
|
220
262
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
221
263
|
# will be added to the HTTP request.
|
222
264
|
#
|
223
265
|
# @return [Concurrent::Promise] promise which provides async access to http
|
224
266
|
# response.
|
225
267
|
#
|
226
|
-
def
|
268
|
+
def delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
227
269
|
# Send request
|
228
|
-
promise =
|
270
|
+
promise = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
229
271
|
|
230
272
|
promise = promise.then do |response|
|
231
273
|
# Defining deserialization method.
|
@@ -240,59 +282,45 @@ module Azure::ARM::Compute
|
|
240
282
|
end
|
241
283
|
|
242
284
|
#
|
243
|
-
#
|
244
|
-
# Shuts down the virtual machines and releases the compute resources. You are
|
245
|
-
# not billed for the compute resources that this virtual machine scale set
|
246
|
-
# uses.
|
285
|
+
# Gets the status of a VM scale set instance.
|
247
286
|
#
|
248
287
|
# @param resource_group_name [String] The name of the resource group.
|
249
|
-
# @param vm_scale_set_name [String] The name of the
|
250
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
251
|
-
# virtual machine scale set instance IDs.
|
288
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
252
289
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
253
290
|
# will be added to the HTTP request.
|
254
291
|
#
|
292
|
+
# @return [VirtualMachineScaleSetInstanceView] operation results.
|
255
293
|
#
|
256
|
-
def
|
257
|
-
response =
|
258
|
-
nil
|
294
|
+
def get_instance_view(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
295
|
+
response = get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
296
|
+
response.body unless response.nil?
|
259
297
|
end
|
260
298
|
|
261
299
|
#
|
262
|
-
#
|
263
|
-
# Shuts down the virtual machines and releases the compute resources. You are
|
264
|
-
# not billed for the compute resources that this virtual machine scale set
|
265
|
-
# uses.
|
300
|
+
# Gets the status of a VM scale set instance.
|
266
301
|
#
|
267
302
|
# @param resource_group_name [String] The name of the resource group.
|
268
|
-
# @param vm_scale_set_name [String] The name of the
|
269
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
270
|
-
# virtual machine scale set instance IDs.
|
303
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
271
304
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
272
305
|
# will be added to the HTTP request.
|
273
306
|
#
|
274
307
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
275
308
|
#
|
276
|
-
def
|
277
|
-
|
309
|
+
def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
310
|
+
get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
278
311
|
end
|
279
312
|
|
280
313
|
#
|
281
|
-
#
|
282
|
-
# Shuts down the virtual machines and releases the compute resources. You are
|
283
|
-
# not billed for the compute resources that this virtual machine scale set
|
284
|
-
# uses.
|
314
|
+
# Gets the status of a VM scale set instance.
|
285
315
|
#
|
286
316
|
# @param resource_group_name [String] The name of the resource group.
|
287
|
-
# @param vm_scale_set_name [String] The name of the
|
288
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
289
|
-
# virtual machine scale set instance IDs.
|
317
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
290
318
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
291
319
|
# to the HTTP request.
|
292
320
|
#
|
293
321
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
294
322
|
#
|
295
|
-
def
|
323
|
+
def get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
296
324
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
297
325
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
298
326
|
api_version = '2016-03-30'
|
@@ -304,15 +332,7 @@ module Azure::ARM::Compute
|
|
304
332
|
# Set Headers
|
305
333
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
306
334
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
307
|
-
|
308
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
309
|
-
|
310
|
-
# Serialize Request
|
311
|
-
request_mapper = VirtualMachineScaleSetVMInstanceIDs.mapper()
|
312
|
-
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
313
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
314
|
-
|
315
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
|
335
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView'
|
316
336
|
|
317
337
|
request_url = @base_url || @client.base_url
|
318
338
|
|
@@ -320,22 +340,31 @@ module Azure::ARM::Compute
|
|
320
340
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
321
341
|
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
322
342
|
query_params: {'api-version' => api_version},
|
323
|
-
body: request_content,
|
324
343
|
headers: request_headers.merge(custom_headers || {}),
|
325
344
|
base_url: request_url
|
326
345
|
}
|
327
|
-
promise = @client.make_request_async(:
|
346
|
+
promise = @client.make_request_async(:get, path_template, options)
|
328
347
|
|
329
348
|
promise = promise.then do |result|
|
330
349
|
http_response = result.response
|
331
350
|
status_code = http_response.status
|
332
351
|
response_content = http_response.body
|
333
|
-
unless status_code ==
|
352
|
+
unless status_code == 200
|
334
353
|
error_model = JSON.load(response_content)
|
335
354
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
336
355
|
end
|
337
356
|
|
338
357
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
358
|
+
# Deserialize Response
|
359
|
+
if status_code == 200
|
360
|
+
begin
|
361
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
362
|
+
result_mapper = VirtualMachineScaleSetInstanceView.mapper()
|
363
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
364
|
+
rescue Exception => e
|
365
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
366
|
+
end
|
367
|
+
end
|
339
368
|
|
340
369
|
result
|
341
370
|
end
|
@@ -344,84 +373,43 @@ module Azure::ARM::Compute
|
|
344
373
|
end
|
345
374
|
|
346
375
|
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
# @param resource_group_name [String] The name of the resource group.
|
350
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
351
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
352
|
-
# will be added to the HTTP request.
|
353
|
-
#
|
354
|
-
def delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
355
|
-
response = delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
356
|
-
nil
|
357
|
-
end
|
358
|
-
|
359
|
-
#
|
360
|
-
# @param resource_group_name [String] The name of the resource group.
|
361
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
362
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
363
|
-
# will be added to the HTTP request.
|
364
|
-
#
|
365
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
366
|
-
# response.
|
367
|
-
#
|
368
|
-
def delete_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
369
|
-
# Send request
|
370
|
-
promise = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers)
|
371
|
-
|
372
|
-
promise = promise.then do |response|
|
373
|
-
# Defining deserialization method.
|
374
|
-
deserialize_method = lambda do |parsed_response|
|
375
|
-
end
|
376
|
-
|
377
|
-
# Waiting for response.
|
378
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
379
|
-
end
|
380
|
-
|
381
|
-
promise
|
382
|
-
end
|
383
|
-
|
384
|
-
#
|
385
|
-
# Allows you to delete a virtual machine scale set.
|
376
|
+
# Gets a list of all VM scale sets under a resource group.
|
386
377
|
#
|
387
378
|
# @param resource_group_name [String] The name of the resource group.
|
388
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
389
379
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
390
380
|
# will be added to the HTTP request.
|
391
381
|
#
|
382
|
+
# @return [Array<VirtualMachineScaleSet>] operation results.
|
392
383
|
#
|
393
|
-
def
|
394
|
-
|
395
|
-
|
384
|
+
def list(resource_group_name, custom_headers = nil)
|
385
|
+
first_page = list_as_lazy(resource_group_name, custom_headers)
|
386
|
+
first_page.get_all_items
|
396
387
|
end
|
397
388
|
|
398
389
|
#
|
399
|
-
#
|
390
|
+
# Gets a list of all VM scale sets under a resource group.
|
400
391
|
#
|
401
392
|
# @param resource_group_name [String] The name of the resource group.
|
402
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
403
393
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
404
394
|
# will be added to the HTTP request.
|
405
395
|
#
|
406
396
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
407
397
|
#
|
408
|
-
def
|
409
|
-
|
398
|
+
def list_with_http_info(resource_group_name, custom_headers = nil)
|
399
|
+
list_async(resource_group_name, custom_headers).value!
|
410
400
|
end
|
411
401
|
|
412
402
|
#
|
413
|
-
#
|
403
|
+
# Gets a list of all VM scale sets under a resource group.
|
414
404
|
#
|
415
405
|
# @param resource_group_name [String] The name of the resource group.
|
416
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
417
406
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
418
407
|
# to the HTTP request.
|
419
408
|
#
|
420
409
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
421
410
|
#
|
422
|
-
def
|
411
|
+
def list_async(resource_group_name, custom_headers = nil)
|
423
412
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
424
|
-
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
425
413
|
api_version = '2016-03-30'
|
426
414
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
427
415
|
|
@@ -431,29 +419,39 @@ module Azure::ARM::Compute
|
|
431
419
|
# Set Headers
|
432
420
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
433
421
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
434
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets
|
422
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets'
|
435
423
|
|
436
424
|
request_url = @base_url || @client.base_url
|
437
425
|
|
438
426
|
options = {
|
439
427
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
440
|
-
path_params: {'resourceGroupName' => resource_group_name,'
|
428
|
+
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
441
429
|
query_params: {'api-version' => api_version},
|
442
430
|
headers: request_headers.merge(custom_headers || {}),
|
443
431
|
base_url: request_url
|
444
432
|
}
|
445
|
-
promise = @client.make_request_async(:
|
433
|
+
promise = @client.make_request_async(:get, path_template, options)
|
446
434
|
|
447
435
|
promise = promise.then do |result|
|
448
436
|
http_response = result.response
|
449
437
|
status_code = http_response.status
|
450
438
|
response_content = http_response.body
|
451
|
-
unless status_code == 200
|
439
|
+
unless status_code == 200
|
452
440
|
error_model = JSON.load(response_content)
|
453
441
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
454
442
|
end
|
455
443
|
|
456
444
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
445
|
+
# Deserialize Response
|
446
|
+
if status_code == 200
|
447
|
+
begin
|
448
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
449
|
+
result_mapper = VirtualMachineScaleSetListResult.mapper()
|
450
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
451
|
+
rescue Exception => e
|
452
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
453
|
+
end
|
454
|
+
end
|
457
455
|
|
458
456
|
result
|
459
457
|
end
|
@@ -462,47 +460,48 @@ module Azure::ARM::Compute
|
|
462
460
|
end
|
463
461
|
|
464
462
|
#
|
465
|
-
#
|
463
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
464
|
+
# associated resource group. Use nextLink property in the response to get the
|
465
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
466
|
+
# the VM Scale Sets.
|
466
467
|
#
|
467
|
-
# @param resource_group_name [String] The name of the resource group.
|
468
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
469
468
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
470
469
|
# will be added to the HTTP request.
|
471
470
|
#
|
472
|
-
# @return [VirtualMachineScaleSet] operation results.
|
471
|
+
# @return [Array<VirtualMachineScaleSet>] operation results.
|
473
472
|
#
|
474
|
-
def
|
475
|
-
|
476
|
-
|
473
|
+
def list_all(custom_headers = nil)
|
474
|
+
first_page = list_all_as_lazy(custom_headers)
|
475
|
+
first_page.get_all_items
|
477
476
|
end
|
478
477
|
|
479
478
|
#
|
480
|
-
#
|
479
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
480
|
+
# associated resource group. Use nextLink property in the response to get the
|
481
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
482
|
+
# the VM Scale Sets.
|
481
483
|
#
|
482
|
-
# @param resource_group_name [String] The name of the resource group.
|
483
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
484
484
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
485
485
|
# will be added to the HTTP request.
|
486
486
|
#
|
487
487
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
488
488
|
#
|
489
|
-
def
|
490
|
-
|
489
|
+
def list_all_with_http_info(custom_headers = nil)
|
490
|
+
list_all_async(custom_headers).value!
|
491
491
|
end
|
492
492
|
|
493
493
|
#
|
494
|
-
#
|
494
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
495
|
+
# associated resource group. Use nextLink property in the response to get the
|
496
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
497
|
+
# the VM Scale Sets.
|
495
498
|
#
|
496
|
-
# @param resource_group_name [String] The name of the resource group.
|
497
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
498
499
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
499
500
|
# to the HTTP request.
|
500
501
|
#
|
501
502
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
502
503
|
#
|
503
|
-
def
|
504
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
505
|
-
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
504
|
+
def list_all_async(custom_headers = nil)
|
506
505
|
api_version = '2016-03-30'
|
507
506
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
508
507
|
|
@@ -512,13 +511,13 @@ module Azure::ARM::Compute
|
|
512
511
|
# Set Headers
|
513
512
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
514
513
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
515
|
-
path_template = '/subscriptions/{subscriptionId}/
|
514
|
+
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'
|
516
515
|
|
517
516
|
request_url = @base_url || @client.base_url
|
518
517
|
|
519
518
|
options = {
|
520
519
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
521
|
-
path_params: {'
|
520
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
522
521
|
query_params: {'api-version' => api_version},
|
523
522
|
headers: request_headers.merge(custom_headers || {}),
|
524
523
|
base_url: request_url
|
@@ -539,7 +538,7 @@ module Azure::ARM::Compute
|
|
539
538
|
if status_code == 200
|
540
539
|
begin
|
541
540
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
542
|
-
result_mapper =
|
541
|
+
result_mapper = VirtualMachineScaleSetListWithLinkResult.mapper()
|
543
542
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
544
543
|
rescue Exception => e
|
545
544
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -553,34 +552,130 @@ module Azure::ARM::Compute
|
|
553
552
|
end
|
554
553
|
|
555
554
|
#
|
556
|
-
#
|
555
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
556
|
+
# and maximum VM instances allowed for each SKU.
|
557
557
|
#
|
558
558
|
# @param resource_group_name [String] The name of the resource group.
|
559
|
-
# @param vm_scale_set_name [String] The name of the
|
560
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
561
|
-
# list of virtual machine scale set instance IDs.
|
559
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
562
560
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
563
561
|
# will be added to the HTTP request.
|
564
562
|
#
|
565
|
-
|
566
|
-
|
563
|
+
# @return [Array<VirtualMachineScaleSetSku>] operation results.
|
564
|
+
#
|
565
|
+
def list_skus(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
566
|
+
first_page = list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers)
|
567
|
+
first_page.get_all_items
|
568
|
+
end
|
569
|
+
|
570
|
+
#
|
571
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
572
|
+
# and maximum VM instances allowed for each SKU.
|
573
|
+
#
|
574
|
+
# @param resource_group_name [String] The name of the resource group.
|
575
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
576
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
577
|
+
# will be added to the HTTP request.
|
578
|
+
#
|
579
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
580
|
+
#
|
581
|
+
def list_skus_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
582
|
+
list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
583
|
+
end
|
584
|
+
|
585
|
+
#
|
586
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
587
|
+
# and maximum VM instances allowed for each SKU.
|
588
|
+
#
|
589
|
+
# @param resource_group_name [String] The name of the resource group.
|
590
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
591
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
592
|
+
# to the HTTP request.
|
593
|
+
#
|
594
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
595
|
+
#
|
596
|
+
def list_skus_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
597
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
598
|
+
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
599
|
+
api_version = '2016-03-30'
|
600
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
601
|
+
|
602
|
+
|
603
|
+
request_headers = {}
|
604
|
+
|
605
|
+
# Set Headers
|
606
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
607
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
608
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus'
|
609
|
+
|
610
|
+
request_url = @base_url || @client.base_url
|
611
|
+
|
612
|
+
options = {
|
613
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
614
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
615
|
+
query_params: {'api-version' => api_version},
|
616
|
+
headers: request_headers.merge(custom_headers || {}),
|
617
|
+
base_url: request_url
|
618
|
+
}
|
619
|
+
promise = @client.make_request_async(:get, path_template, options)
|
620
|
+
|
621
|
+
promise = promise.then do |result|
|
622
|
+
http_response = result.response
|
623
|
+
status_code = http_response.status
|
624
|
+
response_content = http_response.body
|
625
|
+
unless status_code == 200
|
626
|
+
error_model = JSON.load(response_content)
|
627
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
628
|
+
end
|
629
|
+
|
630
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
631
|
+
# Deserialize Response
|
632
|
+
if status_code == 200
|
633
|
+
begin
|
634
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
635
|
+
result_mapper = VirtualMachineScaleSetListSkusResult.mapper()
|
636
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
637
|
+
rescue Exception => e
|
638
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
639
|
+
end
|
640
|
+
end
|
641
|
+
|
642
|
+
result
|
643
|
+
end
|
644
|
+
|
645
|
+
promise.execute
|
646
|
+
end
|
647
|
+
|
648
|
+
#
|
649
|
+
# Power off (stop) one or more virtual machines in a VM scale set. Note that
|
650
|
+
# resources are still attached and you are getting charged for the resources.
|
651
|
+
# Instead, use deallocate to release resources and avoid charges.
|
652
|
+
#
|
653
|
+
# @param resource_group_name [String] The name of the resource group.
|
654
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
655
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
656
|
+
# virtual machine instance IDs from the VM scale set.
|
657
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
658
|
+
# will be added to the HTTP request.
|
659
|
+
#
|
660
|
+
def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
661
|
+
response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
567
662
|
nil
|
568
663
|
end
|
569
664
|
|
570
665
|
#
|
571
666
|
# @param resource_group_name [String] The name of the resource group.
|
572
|
-
# @param vm_scale_set_name [String] The name of the
|
573
|
-
# @param vm_instance_ids [
|
574
|
-
#
|
667
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
668
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
669
|
+
# virtual machine instance IDs from the VM scale set.
|
575
670
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
576
671
|
# will be added to the HTTP request.
|
577
672
|
#
|
578
673
|
# @return [Concurrent::Promise] promise which provides async access to http
|
579
674
|
# response.
|
580
675
|
#
|
581
|
-
def
|
676
|
+
def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
582
677
|
# Send request
|
583
|
-
promise =
|
678
|
+
promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
584
679
|
|
585
680
|
promise = promise.then do |response|
|
586
681
|
# Defining deserialization method.
|
@@ -595,143 +690,217 @@ module Azure::ARM::Compute
|
|
595
690
|
end
|
596
691
|
|
597
692
|
#
|
598
|
-
#
|
693
|
+
# Restarts one or more virtual machines in a VM scale set.
|
599
694
|
#
|
600
695
|
# @param resource_group_name [String] The name of the resource group.
|
601
|
-
# @param vm_scale_set_name [String] The name of the
|
602
|
-
# @param vm_instance_ids [
|
603
|
-
#
|
696
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
697
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
698
|
+
# virtual machine instance IDs from the VM scale set.
|
604
699
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
605
700
|
# will be added to the HTTP request.
|
606
701
|
#
|
607
|
-
|
608
|
-
|
609
|
-
response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
702
|
+
def restart(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
703
|
+
response = restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
610
704
|
nil
|
611
705
|
end
|
612
706
|
|
613
|
-
#
|
614
|
-
# Allows you to delete virtual machines in a virtual machine scale set.
|
615
707
|
#
|
616
708
|
# @param resource_group_name [String] The name of the resource group.
|
617
|
-
# @param vm_scale_set_name [String] The name of the
|
618
|
-
# @param vm_instance_ids [
|
619
|
-
#
|
709
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
710
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
711
|
+
# virtual machine instance IDs from the VM scale set.
|
620
712
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
621
713
|
# will be added to the HTTP request.
|
622
714
|
#
|
623
|
-
# @return [
|
715
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
716
|
+
# response.
|
624
717
|
#
|
625
|
-
def
|
626
|
-
|
718
|
+
def restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
719
|
+
# Send request
|
720
|
+
promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
721
|
+
|
722
|
+
promise = promise.then do |response|
|
723
|
+
# Defining deserialization method.
|
724
|
+
deserialize_method = lambda do |parsed_response|
|
725
|
+
end
|
726
|
+
|
727
|
+
# Waiting for response.
|
728
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
729
|
+
end
|
730
|
+
|
731
|
+
promise
|
627
732
|
end
|
628
733
|
|
629
734
|
#
|
630
|
-
#
|
735
|
+
# Starts one or more virtual machines in a VM scale set.
|
631
736
|
#
|
632
737
|
# @param resource_group_name [String] The name of the resource group.
|
633
|
-
# @param vm_scale_set_name [String] The name of the
|
634
|
-
# @param vm_instance_ids [
|
635
|
-
#
|
636
|
-
# @param [Hash{String => String}] A hash of custom headers that
|
637
|
-
# to the HTTP request.
|
738
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
739
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
740
|
+
# virtual machine instance IDs from the VM scale set.
|
741
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
742
|
+
# will be added to the HTTP request.
|
638
743
|
#
|
639
|
-
|
744
|
+
def start(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
745
|
+
response = start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
746
|
+
nil
|
747
|
+
end
|
748
|
+
|
640
749
|
#
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
750
|
+
# @param resource_group_name [String] The name of the resource group.
|
751
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
752
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
753
|
+
# virtual machine instance IDs from the VM scale set.
|
754
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
755
|
+
# will be added to the HTTP request.
|
756
|
+
#
|
757
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
758
|
+
# response.
|
759
|
+
#
|
760
|
+
def start_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
761
|
+
# Send request
|
762
|
+
promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
647
763
|
|
764
|
+
promise = promise.then do |response|
|
765
|
+
# Defining deserialization method.
|
766
|
+
deserialize_method = lambda do |parsed_response|
|
767
|
+
end
|
648
768
|
|
649
|
-
|
769
|
+
# Waiting for response.
|
770
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
771
|
+
end
|
650
772
|
|
651
|
-
|
652
|
-
|
653
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
773
|
+
promise
|
774
|
+
end
|
654
775
|
|
655
|
-
|
776
|
+
#
|
777
|
+
# Upgrades one or more virtual machines to the latest SKU set in the VM scale
|
778
|
+
# set model.
|
779
|
+
#
|
780
|
+
# @param resource_group_name [String] The name of the resource group.
|
781
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
782
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
783
|
+
# of virtual machine instance IDs from the VM scale set.
|
784
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
785
|
+
# will be added to the HTTP request.
|
786
|
+
#
|
787
|
+
def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
788
|
+
response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
789
|
+
nil
|
790
|
+
end
|
656
791
|
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
792
|
+
#
|
793
|
+
# @param resource_group_name [String] The name of the resource group.
|
794
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
795
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
796
|
+
# of virtual machine instance IDs from the VM scale set.
|
797
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
798
|
+
# will be added to the HTTP request.
|
799
|
+
#
|
800
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
801
|
+
# response.
|
802
|
+
#
|
803
|
+
def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
804
|
+
# Send request
|
805
|
+
promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
661
806
|
|
662
|
-
|
807
|
+
promise = promise.then do |response|
|
808
|
+
# Defining deserialization method.
|
809
|
+
deserialize_method = lambda do |parsed_response|
|
810
|
+
end
|
663
811
|
|
664
|
-
|
812
|
+
# Waiting for response.
|
813
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
814
|
+
end
|
665
815
|
|
666
|
-
|
667
|
-
|
668
|
-
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
669
|
-
query_params: {'api-version' => api_version},
|
670
|
-
body: request_content,
|
671
|
-
headers: request_headers.merge(custom_headers || {}),
|
672
|
-
base_url: request_url
|
673
|
-
}
|
674
|
-
promise = @client.make_request_async(:post, path_template, options)
|
816
|
+
promise
|
817
|
+
end
|
675
818
|
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
819
|
+
#
|
820
|
+
# Reimages (upgrade the operating system) one or more virtual machines in a VM
|
821
|
+
# scale set.
|
822
|
+
#
|
823
|
+
# @param resource_group_name [String] The name of the resource group.
|
824
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
825
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
826
|
+
# will be added to the HTTP request.
|
827
|
+
#
|
828
|
+
def reimage(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
829
|
+
response = reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
830
|
+
nil
|
831
|
+
end
|
684
832
|
|
685
|
-
|
833
|
+
#
|
834
|
+
# @param resource_group_name [String] The name of the resource group.
|
835
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
836
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
837
|
+
# will be added to the HTTP request.
|
838
|
+
#
|
839
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
840
|
+
# response.
|
841
|
+
#
|
842
|
+
def reimage_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
843
|
+
# Send request
|
844
|
+
promise = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers)
|
686
845
|
|
687
|
-
|
846
|
+
promise = promise.then do |response|
|
847
|
+
# Defining deserialization method.
|
848
|
+
deserialize_method = lambda do |parsed_response|
|
849
|
+
end
|
850
|
+
|
851
|
+
# Waiting for response.
|
852
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
688
853
|
end
|
689
854
|
|
690
|
-
promise
|
855
|
+
promise
|
691
856
|
end
|
692
857
|
|
693
858
|
#
|
694
|
-
#
|
859
|
+
# Create or update a VM scale set.
|
695
860
|
#
|
696
861
|
# @param resource_group_name [String] The name of the resource group.
|
697
|
-
# @param
|
862
|
+
# @param name [String] The name of the VM scale set to create or update.
|
863
|
+
# @param parameters [VirtualMachineScaleSet] The scale set object.
|
698
864
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
699
865
|
# will be added to the HTTP request.
|
700
866
|
#
|
701
|
-
# @return [
|
867
|
+
# @return [VirtualMachineScaleSet] operation results.
|
702
868
|
#
|
703
|
-
def
|
704
|
-
response =
|
869
|
+
def begin_create_or_update(resource_group_name, name, parameters, custom_headers = nil)
|
870
|
+
response = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
|
705
871
|
response.body unless response.nil?
|
706
872
|
end
|
707
873
|
|
708
874
|
#
|
709
|
-
#
|
875
|
+
# Create or update a VM scale set.
|
710
876
|
#
|
711
877
|
# @param resource_group_name [String] The name of the resource group.
|
712
|
-
# @param
|
878
|
+
# @param name [String] The name of the VM scale set to create or update.
|
879
|
+
# @param parameters [VirtualMachineScaleSet] The scale set object.
|
713
880
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
714
881
|
# will be added to the HTTP request.
|
715
882
|
#
|
716
883
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
717
884
|
#
|
718
|
-
def
|
719
|
-
|
885
|
+
def begin_create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers = nil)
|
886
|
+
begin_create_or_update_async(resource_group_name, name, parameters, custom_headers).value!
|
720
887
|
end
|
721
888
|
|
722
889
|
#
|
723
|
-
#
|
890
|
+
# Create or update a VM scale set.
|
724
891
|
#
|
725
892
|
# @param resource_group_name [String] The name of the resource group.
|
726
|
-
# @param
|
893
|
+
# @param name [String] The name of the VM scale set to create or update.
|
894
|
+
# @param parameters [VirtualMachineScaleSet] The scale set object.
|
727
895
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
728
896
|
# to the HTTP request.
|
729
897
|
#
|
730
898
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
731
899
|
#
|
732
|
-
def
|
900
|
+
def begin_create_or_update_async(resource_group_name, name, parameters, custom_headers = nil)
|
733
901
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
734
|
-
fail ArgumentError, '
|
902
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
903
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
735
904
|
api_version = '2016-03-30'
|
736
905
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
737
906
|
|
@@ -741,24 +910,33 @@ module Azure::ARM::Compute
|
|
741
910
|
# Set Headers
|
742
911
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
743
912
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
744
|
-
|
913
|
+
|
914
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
915
|
+
|
916
|
+
# Serialize Request
|
917
|
+
request_mapper = VirtualMachineScaleSet.mapper()
|
918
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
919
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
920
|
+
|
921
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}'
|
745
922
|
|
746
923
|
request_url = @base_url || @client.base_url
|
747
924
|
|
748
925
|
options = {
|
749
926
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
750
|
-
path_params: {'resourceGroupName' => resource_group_name,'
|
927
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
|
751
928
|
query_params: {'api-version' => api_version},
|
929
|
+
body: request_content,
|
752
930
|
headers: request_headers.merge(custom_headers || {}),
|
753
931
|
base_url: request_url
|
754
932
|
}
|
755
|
-
promise = @client.make_request_async(:
|
933
|
+
promise = @client.make_request_async(:put, path_template, options)
|
756
934
|
|
757
935
|
promise = promise.then do |result|
|
758
936
|
http_response = result.response
|
759
937
|
status_code = http_response.status
|
760
938
|
response_content = http_response.body
|
761
|
-
unless status_code == 200
|
939
|
+
unless status_code == 200 || status_code == 201
|
762
940
|
error_model = JSON.load(response_content)
|
763
941
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
764
942
|
end
|
@@ -768,7 +946,17 @@ module Azure::ARM::Compute
|
|
768
946
|
if status_code == 200
|
769
947
|
begin
|
770
948
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
771
|
-
result_mapper =
|
949
|
+
result_mapper = VirtualMachineScaleSet.mapper()
|
950
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
951
|
+
rescue Exception => e
|
952
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
953
|
+
end
|
954
|
+
end
|
955
|
+
# Deserialize Response
|
956
|
+
if status_code == 201
|
957
|
+
begin
|
958
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
959
|
+
result_mapper = VirtualMachineScaleSet.mapper()
|
772
960
|
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
773
961
|
rescue Exception => e
|
774
962
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
@@ -782,64 +970,58 @@ module Azure::ARM::Compute
|
|
782
970
|
end
|
783
971
|
|
784
972
|
#
|
785
|
-
#
|
973
|
+
# Deallocates specific virtual machines in a VM scale set. Shuts down the
|
974
|
+
# virtual machines and releases the compute resources. You are not billed for
|
975
|
+
# the compute resources that this virtual machine scale set deallocates.
|
786
976
|
#
|
787
977
|
# @param resource_group_name [String] The name of the resource group.
|
978
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
979
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
980
|
+
# virtual machine instance IDs from the VM scale set.
|
788
981
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
789
982
|
# will be added to the HTTP request.
|
790
983
|
#
|
791
|
-
# @return [VirtualMachineScaleSetListResult] which provide lazy access to
|
792
|
-
# pages of the response.
|
793
|
-
#
|
794
|
-
def list_as_lazy(resource_group_name, custom_headers = nil)
|
795
|
-
response = list_async(resource_group_name, custom_headers).value!
|
796
|
-
unless response.nil?
|
797
|
-
page = response.body
|
798
|
-
page.next_method = Proc.new do |next_page_link|
|
799
|
-
list_next_async(next_page_link, custom_headers)
|
800
|
-
end
|
801
|
-
page
|
802
|
-
end
|
803
|
-
end
|
804
|
-
|
805
|
-
#
|
806
|
-
# Lists all virtual machine scale sets under a resource group.
|
807
984
|
#
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
#
|
812
|
-
# @return [Array<VirtualMachineScaleSet>] operation results.
|
813
|
-
#
|
814
|
-
def list(resource_group_name, custom_headers = nil)
|
815
|
-
first_page = list_as_lazy(resource_group_name, custom_headers)
|
816
|
-
first_page.get_all_items
|
985
|
+
def begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
986
|
+
response = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
987
|
+
nil
|
817
988
|
end
|
818
989
|
|
819
990
|
#
|
820
|
-
#
|
991
|
+
# Deallocates specific virtual machines in a VM scale set. Shuts down the
|
992
|
+
# virtual machines and releases the compute resources. You are not billed for
|
993
|
+
# the compute resources that this virtual machine scale set deallocates.
|
821
994
|
#
|
822
995
|
# @param resource_group_name [String] The name of the resource group.
|
996
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
997
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
998
|
+
# virtual machine instance IDs from the VM scale set.
|
823
999
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
824
1000
|
# will be added to the HTTP request.
|
825
1001
|
#
|
826
1002
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
827
1003
|
#
|
828
|
-
def
|
829
|
-
|
1004
|
+
def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1005
|
+
begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
830
1006
|
end
|
831
1007
|
|
832
1008
|
#
|
833
|
-
#
|
1009
|
+
# Deallocates specific virtual machines in a VM scale set. Shuts down the
|
1010
|
+
# virtual machines and releases the compute resources. You are not billed for
|
1011
|
+
# the compute resources that this virtual machine scale set deallocates.
|
834
1012
|
#
|
835
1013
|
# @param resource_group_name [String] The name of the resource group.
|
1014
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1015
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1016
|
+
# virtual machine instance IDs from the VM scale set.
|
836
1017
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
837
1018
|
# to the HTTP request.
|
838
1019
|
#
|
839
1020
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
840
1021
|
#
|
841
|
-
def
|
1022
|
+
def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
842
1023
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1024
|
+
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
843
1025
|
api_version = '2016-03-30'
|
844
1026
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
845
1027
|
|
@@ -849,39 +1031,38 @@ module Azure::ARM::Compute
|
|
849
1031
|
# Set Headers
|
850
1032
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
851
1033
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
852
|
-
|
1034
|
+
|
1035
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1036
|
+
|
1037
|
+
# Serialize Request
|
1038
|
+
request_mapper = VirtualMachineScaleSetVMInstanceIDs.mapper()
|
1039
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
1040
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1041
|
+
|
1042
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate'
|
853
1043
|
|
854
1044
|
request_url = @base_url || @client.base_url
|
855
1045
|
|
856
1046
|
options = {
|
857
1047
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
858
|
-
path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
|
1048
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
859
1049
|
query_params: {'api-version' => api_version},
|
1050
|
+
body: request_content,
|
860
1051
|
headers: request_headers.merge(custom_headers || {}),
|
861
1052
|
base_url: request_url
|
862
1053
|
}
|
863
|
-
promise = @client.make_request_async(:
|
1054
|
+
promise = @client.make_request_async(:post, path_template, options)
|
864
1055
|
|
865
1056
|
promise = promise.then do |result|
|
866
1057
|
http_response = result.response
|
867
1058
|
status_code = http_response.status
|
868
1059
|
response_content = http_response.body
|
869
|
-
unless status_code ==
|
1060
|
+
unless status_code == 202
|
870
1061
|
error_model = JSON.load(response_content)
|
871
1062
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
872
1063
|
end
|
873
1064
|
|
874
1065
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
875
|
-
# Deserialize Response
|
876
|
-
if status_code == 200
|
877
|
-
begin
|
878
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
879
|
-
result_mapper = VirtualMachineScaleSetListResult.mapper()
|
880
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
881
|
-
rescue Exception => e
|
882
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
883
|
-
end
|
884
|
-
end
|
885
1066
|
|
886
1067
|
result
|
887
1068
|
end
|
@@ -890,71 +1071,46 @@ module Azure::ARM::Compute
|
|
890
1071
|
end
|
891
1072
|
|
892
1073
|
#
|
893
|
-
#
|
894
|
-
# property in the response to get the next page of Virtual Machine Scale
|
895
|
-
# Sets. Do this till nextLink is not null to fetch all the Virtual Machine
|
896
|
-
# Scale Sets.
|
897
|
-
#
|
898
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
899
|
-
# will be added to the HTTP request.
|
900
|
-
#
|
901
|
-
# @return [VirtualMachineScaleSetListWithLinkResult] which provide lazy access
|
902
|
-
# to pages of the response.
|
903
|
-
#
|
904
|
-
def list_all_as_lazy(custom_headers = nil)
|
905
|
-
response = list_all_async(custom_headers).value!
|
906
|
-
unless response.nil?
|
907
|
-
page = response.body
|
908
|
-
page.next_method = Proc.new do |next_page_link|
|
909
|
-
list_all_next_async(next_page_link, custom_headers)
|
910
|
-
end
|
911
|
-
page
|
912
|
-
end
|
913
|
-
end
|
914
|
-
|
915
|
-
#
|
916
|
-
# Lists all Virtual Machine Scale Sets in the subscription. Use nextLink
|
917
|
-
# property in the response to get the next page of Virtual Machine Scale
|
918
|
-
# Sets. Do this till nextLink is not null to fetch all the Virtual Machine
|
919
|
-
# Scale Sets.
|
1074
|
+
# Deletes a VM scale set.
|
920
1075
|
#
|
1076
|
+
# @param resource_group_name [String] The name of the resource group.
|
1077
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
921
1078
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
922
1079
|
# will be added to the HTTP request.
|
923
1080
|
#
|
924
|
-
# @return [Array<VirtualMachineScaleSet>] operation results.
|
925
1081
|
#
|
926
|
-
def
|
927
|
-
|
928
|
-
|
1082
|
+
def begin_delete(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1083
|
+
response = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
1084
|
+
nil
|
929
1085
|
end
|
930
1086
|
|
931
1087
|
#
|
932
|
-
#
|
933
|
-
# property in the response to get the next page of Virtual Machine Scale
|
934
|
-
# Sets. Do this till nextLink is not null to fetch all the Virtual Machine
|
935
|
-
# Scale Sets.
|
1088
|
+
# Deletes a VM scale set.
|
936
1089
|
#
|
1090
|
+
# @param resource_group_name [String] The name of the resource group.
|
1091
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
937
1092
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
938
1093
|
# will be added to the HTTP request.
|
939
1094
|
#
|
940
1095
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
941
1096
|
#
|
942
|
-
def
|
943
|
-
|
1097
|
+
def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1098
|
+
begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
944
1099
|
end
|
945
1100
|
|
946
1101
|
#
|
947
|
-
#
|
948
|
-
# property in the response to get the next page of Virtual Machine Scale
|
949
|
-
# Sets. Do this till nextLink is not null to fetch all the Virtual Machine
|
950
|
-
# Scale Sets.
|
1102
|
+
# Deletes a VM scale set.
|
951
1103
|
#
|
1104
|
+
# @param resource_group_name [String] The name of the resource group.
|
1105
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
952
1106
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
953
1107
|
# to the HTTP request.
|
954
1108
|
#
|
955
1109
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
956
1110
|
#
|
957
|
-
def
|
1111
|
+
def begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1112
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1113
|
+
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
958
1114
|
api_version = '2016-03-30'
|
959
1115
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
960
1116
|
|
@@ -964,39 +1120,29 @@ module Azure::ARM::Compute
|
|
964
1120
|
# Set Headers
|
965
1121
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
966
1122
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
967
|
-
path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets'
|
1123
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}'
|
968
1124
|
|
969
1125
|
request_url = @base_url || @client.base_url
|
970
1126
|
|
971
1127
|
options = {
|
972
1128
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
973
|
-
path_params: {'subscriptionId' => @client.subscription_id},
|
1129
|
+
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
974
1130
|
query_params: {'api-version' => api_version},
|
975
1131
|
headers: request_headers.merge(custom_headers || {}),
|
976
1132
|
base_url: request_url
|
977
1133
|
}
|
978
|
-
promise = @client.make_request_async(:
|
1134
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
979
1135
|
|
980
1136
|
promise = promise.then do |result|
|
981
1137
|
http_response = result.response
|
982
1138
|
status_code = http_response.status
|
983
1139
|
response_content = http_response.body
|
984
|
-
unless status_code == 200
|
1140
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
985
1141
|
error_model = JSON.load(response_content)
|
986
1142
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
987
1143
|
end
|
988
1144
|
|
989
1145
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
990
|
-
# Deserialize Response
|
991
|
-
if status_code == 200
|
992
|
-
begin
|
993
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
994
|
-
result_mapper = VirtualMachineScaleSetListWithLinkResult.mapper()
|
995
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
996
|
-
rescue Exception => e
|
997
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
998
|
-
end
|
999
|
-
end
|
1000
1146
|
|
1001
1147
|
result
|
1002
1148
|
end
|
@@ -1005,83 +1151,71 @@ module Azure::ARM::Compute
|
|
1005
1151
|
end
|
1006
1152
|
|
1007
1153
|
#
|
1008
|
-
#
|
1009
|
-
# minimum and maximum vm instances allowed for a particular sku.
|
1154
|
+
# Deletes virtual machines in a VM scale set.
|
1010
1155
|
#
|
1011
1156
|
# @param resource_group_name [String] The name of the resource group.
|
1012
|
-
# @param vm_scale_set_name [String] The name of the
|
1157
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1158
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
1159
|
+
# of virtual machine instance IDs from the VM scale set.
|
1013
1160
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1014
1161
|
# will be added to the HTTP request.
|
1015
1162
|
#
|
1016
|
-
# @return [VirtualMachineScaleSetListSkusResult] which provide lazy access to
|
1017
|
-
# pages of the response.
|
1018
|
-
#
|
1019
|
-
def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1020
|
-
response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
1021
|
-
unless response.nil?
|
1022
|
-
page = response.body
|
1023
|
-
page.next_method = Proc.new do |next_page_link|
|
1024
|
-
list_skus_next_async(next_page_link, custom_headers)
|
1025
|
-
end
|
1026
|
-
page
|
1027
|
-
end
|
1028
|
-
end
|
1029
|
-
|
1030
1163
|
#
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
# @param resource_group_name [String] The name of the resource group.
|
1035
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1036
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1037
|
-
# will be added to the HTTP request.
|
1038
|
-
#
|
1039
|
-
# @return [Array<VirtualMachineScaleSetSku>] operation results.
|
1040
|
-
#
|
1041
|
-
def list_skus(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1042
|
-
first_page = list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers)
|
1043
|
-
first_page.get_all_items
|
1164
|
+
def begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1165
|
+
response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1166
|
+
nil
|
1044
1167
|
end
|
1045
1168
|
|
1046
1169
|
#
|
1047
|
-
#
|
1048
|
-
# minimum and maximum vm instances allowed for a particular sku.
|
1170
|
+
# Deletes virtual machines in a VM scale set.
|
1049
1171
|
#
|
1050
1172
|
# @param resource_group_name [String] The name of the resource group.
|
1051
|
-
# @param vm_scale_set_name [String] The name of the
|
1173
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1174
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
1175
|
+
# of virtual machine instance IDs from the VM scale set.
|
1052
1176
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1053
1177
|
# will be added to the HTTP request.
|
1054
1178
|
#
|
1055
1179
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1056
1180
|
#
|
1057
|
-
def
|
1058
|
-
|
1181
|
+
def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1182
|
+
begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1059
1183
|
end
|
1060
1184
|
|
1061
1185
|
#
|
1062
|
-
#
|
1063
|
-
# minimum and maximum vm instances allowed for a particular sku.
|
1186
|
+
# Deletes virtual machines in a VM scale set.
|
1064
1187
|
#
|
1065
1188
|
# @param resource_group_name [String] The name of the resource group.
|
1066
|
-
# @param vm_scale_set_name [String] The name of the
|
1189
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1190
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
1191
|
+
# of virtual machine instance IDs from the VM scale set.
|
1067
1192
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1068
1193
|
# to the HTTP request.
|
1069
1194
|
#
|
1070
1195
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1071
1196
|
#
|
1072
|
-
def
|
1197
|
+
def begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1073
1198
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1074
1199
|
fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil?
|
1200
|
+
fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil?
|
1075
1201
|
api_version = '2016-03-30'
|
1076
1202
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1077
1203
|
|
1078
1204
|
|
1079
1205
|
request_headers = {}
|
1080
1206
|
|
1081
|
-
# Set Headers
|
1082
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1083
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1084
|
-
|
1207
|
+
# Set Headers
|
1208
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1209
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1210
|
+
|
1211
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1212
|
+
|
1213
|
+
# Serialize Request
|
1214
|
+
request_mapper = VirtualMachineScaleSetVMInstanceRequiredIDs.mapper()
|
1215
|
+
request_content = @client.serialize(request_mapper, vm_instance_ids, 'vm_instance_ids')
|
1216
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1217
|
+
|
1218
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete'
|
1085
1219
|
|
1086
1220
|
request_url = @base_url || @client.base_url
|
1087
1221
|
|
@@ -1089,31 +1223,22 @@ module Azure::ARM::Compute
|
|
1089
1223
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1090
1224
|
path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id},
|
1091
1225
|
query_params: {'api-version' => api_version},
|
1226
|
+
body: request_content,
|
1092
1227
|
headers: request_headers.merge(custom_headers || {}),
|
1093
1228
|
base_url: request_url
|
1094
1229
|
}
|
1095
|
-
promise = @client.make_request_async(:
|
1230
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1096
1231
|
|
1097
1232
|
promise = promise.then do |result|
|
1098
1233
|
http_response = result.response
|
1099
1234
|
status_code = http_response.status
|
1100
1235
|
response_content = http_response.body
|
1101
|
-
unless status_code ==
|
1236
|
+
unless status_code == 202
|
1102
1237
|
error_model = JSON.load(response_content)
|
1103
1238
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1104
1239
|
end
|
1105
1240
|
|
1106
1241
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1107
|
-
# Deserialize Response
|
1108
|
-
if status_code == 200
|
1109
|
-
begin
|
1110
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1111
|
-
result_mapper = VirtualMachineScaleSetListSkusResult.mapper()
|
1112
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1113
|
-
rescue Exception => e
|
1114
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1115
|
-
end
|
1116
|
-
end
|
1117
1242
|
|
1118
1243
|
result
|
1119
1244
|
end
|
@@ -1122,58 +1247,14 @@ module Azure::ARM::Compute
|
|
1122
1247
|
end
|
1123
1248
|
|
1124
1249
|
#
|
1125
|
-
#
|
1126
|
-
#
|
1127
|
-
#
|
1128
|
-
#
|
1129
|
-
# @param resource_group_name [String] The name of the resource group.
|
1130
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1131
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1132
|
-
# virtual machine scale set instance IDs.
|
1133
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1134
|
-
# will be added to the HTTP request.
|
1135
|
-
#
|
1136
|
-
def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1137
|
-
response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1138
|
-
nil
|
1139
|
-
end
|
1140
|
-
|
1141
|
-
#
|
1142
|
-
# @param resource_group_name [String] The name of the resource group.
|
1143
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1144
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1145
|
-
# virtual machine scale set instance IDs.
|
1146
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1147
|
-
# will be added to the HTTP request.
|
1148
|
-
#
|
1149
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
1150
|
-
# response.
|
1151
|
-
#
|
1152
|
-
def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1153
|
-
# Send request
|
1154
|
-
promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1155
|
-
|
1156
|
-
promise = promise.then do |response|
|
1157
|
-
# Defining deserialization method.
|
1158
|
-
deserialize_method = lambda do |parsed_response|
|
1159
|
-
end
|
1160
|
-
|
1161
|
-
# Waiting for response.
|
1162
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
1163
|
-
end
|
1164
|
-
|
1165
|
-
promise
|
1166
|
-
end
|
1167
|
-
|
1168
|
-
#
|
1169
|
-
# Allows you to power off (stop) virtual machines in a virtual machine scale
|
1170
|
-
# set. Note that resources are still attached and you are getting charged for
|
1171
|
-
# the resources. Use deallocate to release resources.
|
1250
|
+
# Power off (stop) one or more virtual machines in a VM scale set. Note that
|
1251
|
+
# resources are still attached and you are getting charged for the resources.
|
1252
|
+
# Instead, use deallocate to release resources and avoid charges.
|
1172
1253
|
#
|
1173
1254
|
# @param resource_group_name [String] The name of the resource group.
|
1174
|
-
# @param vm_scale_set_name [String] The name of the
|
1175
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1176
|
-
# virtual machine scale set
|
1255
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1256
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1257
|
+
# virtual machine instance IDs from the VM scale set.
|
1177
1258
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1178
1259
|
# will be added to the HTTP request.
|
1179
1260
|
#
|
@@ -1184,14 +1265,14 @@ module Azure::ARM::Compute
|
|
1184
1265
|
end
|
1185
1266
|
|
1186
1267
|
#
|
1187
|
-
#
|
1188
|
-
#
|
1189
|
-
#
|
1268
|
+
# Power off (stop) one or more virtual machines in a VM scale set. Note that
|
1269
|
+
# resources are still attached and you are getting charged for the resources.
|
1270
|
+
# Instead, use deallocate to release resources and avoid charges.
|
1190
1271
|
#
|
1191
1272
|
# @param resource_group_name [String] The name of the resource group.
|
1192
|
-
# @param vm_scale_set_name [String] The name of the
|
1193
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1194
|
-
# virtual machine scale set
|
1273
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1274
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1275
|
+
# virtual machine instance IDs from the VM scale set.
|
1195
1276
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1196
1277
|
# will be added to the HTTP request.
|
1197
1278
|
#
|
@@ -1202,14 +1283,14 @@ module Azure::ARM::Compute
|
|
1202
1283
|
end
|
1203
1284
|
|
1204
1285
|
#
|
1205
|
-
#
|
1206
|
-
#
|
1207
|
-
#
|
1286
|
+
# Power off (stop) one or more virtual machines in a VM scale set. Note that
|
1287
|
+
# resources are still attached and you are getting charged for the resources.
|
1288
|
+
# Instead, use deallocate to release resources and avoid charges.
|
1208
1289
|
#
|
1209
1290
|
# @param resource_group_name [String] The name of the resource group.
|
1210
|
-
# @param vm_scale_set_name [String] The name of the
|
1211
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1212
|
-
# virtual machine scale set
|
1291
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1292
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1293
|
+
# virtual machine instance IDs from the VM scale set.
|
1213
1294
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1214
1295
|
# to the HTTP request.
|
1215
1296
|
#
|
@@ -1267,54 +1348,12 @@ module Azure::ARM::Compute
|
|
1267
1348
|
end
|
1268
1349
|
|
1269
1350
|
#
|
1270
|
-
#
|
1271
|
-
#
|
1272
|
-
# @param resource_group_name [String] The name of the resource group.
|
1273
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1274
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1275
|
-
# virtual machine scale set instance IDs.
|
1276
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1277
|
-
# will be added to the HTTP request.
|
1278
|
-
#
|
1279
|
-
def restart(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1280
|
-
response = restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1281
|
-
nil
|
1282
|
-
end
|
1283
|
-
|
1284
|
-
#
|
1285
|
-
# @param resource_group_name [String] The name of the resource group.
|
1286
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1287
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1288
|
-
# virtual machine scale set instance IDs.
|
1289
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1290
|
-
# will be added to the HTTP request.
|
1291
|
-
#
|
1292
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
1293
|
-
# response.
|
1294
|
-
#
|
1295
|
-
def restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1296
|
-
# Send request
|
1297
|
-
promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1298
|
-
|
1299
|
-
promise = promise.then do |response|
|
1300
|
-
# Defining deserialization method.
|
1301
|
-
deserialize_method = lambda do |parsed_response|
|
1302
|
-
end
|
1303
|
-
|
1304
|
-
# Waiting for response.
|
1305
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
1306
|
-
end
|
1307
|
-
|
1308
|
-
promise
|
1309
|
-
end
|
1310
|
-
|
1311
|
-
#
|
1312
|
-
# Allows you to restart virtual machines in a virtual machine scale set.
|
1351
|
+
# Restarts one or more virtual machines in a VM scale set.
|
1313
1352
|
#
|
1314
1353
|
# @param resource_group_name [String] The name of the resource group.
|
1315
|
-
# @param vm_scale_set_name [String] The name of the
|
1316
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1317
|
-
# virtual machine scale set
|
1354
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1355
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1356
|
+
# virtual machine instance IDs from the VM scale set.
|
1318
1357
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1319
1358
|
# will be added to the HTTP request.
|
1320
1359
|
#
|
@@ -1325,12 +1364,12 @@ module Azure::ARM::Compute
|
|
1325
1364
|
end
|
1326
1365
|
|
1327
1366
|
#
|
1328
|
-
#
|
1367
|
+
# Restarts one or more virtual machines in a VM scale set.
|
1329
1368
|
#
|
1330
1369
|
# @param resource_group_name [String] The name of the resource group.
|
1331
|
-
# @param vm_scale_set_name [String] The name of the
|
1332
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1333
|
-
# virtual machine scale set
|
1370
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1371
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1372
|
+
# virtual machine instance IDs from the VM scale set.
|
1334
1373
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1335
1374
|
# will be added to the HTTP request.
|
1336
1375
|
#
|
@@ -1341,12 +1380,12 @@ module Azure::ARM::Compute
|
|
1341
1380
|
end
|
1342
1381
|
|
1343
1382
|
#
|
1344
|
-
#
|
1383
|
+
# Restarts one or more virtual machines in a VM scale set.
|
1345
1384
|
#
|
1346
1385
|
# @param resource_group_name [String] The name of the resource group.
|
1347
|
-
# @param vm_scale_set_name [String] The name of the
|
1348
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1349
|
-
# virtual machine scale set
|
1386
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1387
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1388
|
+
# virtual machine instance IDs from the VM scale set.
|
1350
1389
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1351
1390
|
# to the HTTP request.
|
1352
1391
|
#
|
@@ -1404,54 +1443,12 @@ module Azure::ARM::Compute
|
|
1404
1443
|
end
|
1405
1444
|
|
1406
1445
|
#
|
1407
|
-
#
|
1408
|
-
#
|
1409
|
-
# @param resource_group_name [String] The name of the resource group.
|
1410
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1411
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1412
|
-
# virtual machine scale set instance IDs.
|
1413
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1414
|
-
# will be added to the HTTP request.
|
1415
|
-
#
|
1416
|
-
def start(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1417
|
-
response = start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1418
|
-
nil
|
1419
|
-
end
|
1420
|
-
|
1421
|
-
#
|
1422
|
-
# @param resource_group_name [String] The name of the resource group.
|
1423
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1424
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] The list of
|
1425
|
-
# virtual machine scale set instance IDs.
|
1426
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1427
|
-
# will be added to the HTTP request.
|
1428
|
-
#
|
1429
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
1430
|
-
# response.
|
1431
|
-
#
|
1432
|
-
def start_async(resource_group_name, vm_scale_set_name, vm_instance_ids = nil, custom_headers = nil)
|
1433
|
-
# Send request
|
1434
|
-
promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1435
|
-
|
1436
|
-
promise = promise.then do |response|
|
1437
|
-
# Defining deserialization method.
|
1438
|
-
deserialize_method = lambda do |parsed_response|
|
1439
|
-
end
|
1440
|
-
|
1441
|
-
# Waiting for response.
|
1442
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
1443
|
-
end
|
1444
|
-
|
1445
|
-
promise
|
1446
|
-
end
|
1447
|
-
|
1448
|
-
#
|
1449
|
-
# Allows you to start virtual machines in a virtual machine scale set.
|
1446
|
+
# Starts one or more virtual machines in a VM scale set.
|
1450
1447
|
#
|
1451
1448
|
# @param resource_group_name [String] The name of the resource group.
|
1452
|
-
# @param vm_scale_set_name [String] The name of the
|
1453
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1454
|
-
# virtual machine scale set
|
1449
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1450
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1451
|
+
# virtual machine instance IDs from the VM scale set.
|
1455
1452
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1456
1453
|
# will be added to the HTTP request.
|
1457
1454
|
#
|
@@ -1462,12 +1459,12 @@ module Azure::ARM::Compute
|
|
1462
1459
|
end
|
1463
1460
|
|
1464
1461
|
#
|
1465
|
-
#
|
1462
|
+
# Starts one or more virtual machines in a VM scale set.
|
1466
1463
|
#
|
1467
1464
|
# @param resource_group_name [String] The name of the resource group.
|
1468
|
-
# @param vm_scale_set_name [String] The name of the
|
1469
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1470
|
-
# virtual machine scale set
|
1465
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1466
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1467
|
+
# virtual machine instance IDs from the VM scale set.
|
1471
1468
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1472
1469
|
# will be added to the HTTP request.
|
1473
1470
|
#
|
@@ -1478,12 +1475,12 @@ module Azure::ARM::Compute
|
|
1478
1475
|
end
|
1479
1476
|
|
1480
1477
|
#
|
1481
|
-
#
|
1478
|
+
# Starts one or more virtual machines in a VM scale set.
|
1482
1479
|
#
|
1483
1480
|
# @param resource_group_name [String] The name of the resource group.
|
1484
|
-
# @param vm_scale_set_name [String] The name of the
|
1485
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs]
|
1486
|
-
# virtual machine scale set
|
1481
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1482
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceIDs] A list of
|
1483
|
+
# virtual machine instance IDs from the VM scale set.
|
1487
1484
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1488
1485
|
# to the HTTP request.
|
1489
1486
|
#
|
@@ -1541,56 +1538,13 @@ module Azure::ARM::Compute
|
|
1541
1538
|
end
|
1542
1539
|
|
1543
1540
|
#
|
1544
|
-
#
|
1545
|
-
# set.
|
1546
|
-
#
|
1547
|
-
# @param resource_group_name [String] The name of the resource group.
|
1548
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1549
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
1550
|
-
# list of virtual machine scale set instance IDs.
|
1551
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1552
|
-
# will be added to the HTTP request.
|
1553
|
-
#
|
1554
|
-
def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1555
|
-
response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers).value!
|
1556
|
-
nil
|
1557
|
-
end
|
1558
|
-
|
1559
|
-
#
|
1560
|
-
# @param resource_group_name [String] The name of the resource group.
|
1561
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1562
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] The
|
1563
|
-
# list of virtual machine scale set instance IDs.
|
1564
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1565
|
-
# will be added to the HTTP request.
|
1566
|
-
#
|
1567
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
1568
|
-
# response.
|
1569
|
-
#
|
1570
|
-
def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers = nil)
|
1571
|
-
# Send request
|
1572
|
-
promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers)
|
1573
|
-
|
1574
|
-
promise = promise.then do |response|
|
1575
|
-
# Defining deserialization method.
|
1576
|
-
deserialize_method = lambda do |parsed_response|
|
1577
|
-
end
|
1578
|
-
|
1579
|
-
# Waiting for response.
|
1580
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
1581
|
-
end
|
1582
|
-
|
1583
|
-
promise
|
1584
|
-
end
|
1585
|
-
|
1586
|
-
#
|
1587
|
-
# Allows you to manually upgrade virtual machines in a virtual machine scale
|
1588
|
-
# set.
|
1541
|
+
# Upgrades one or more virtual machines to the latest SKU set in the VM scale
|
1542
|
+
# set model.
|
1589
1543
|
#
|
1590
1544
|
# @param resource_group_name [String] The name of the resource group.
|
1591
|
-
# @param vm_scale_set_name [String] The name of the
|
1592
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs]
|
1593
|
-
#
|
1545
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1546
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
1547
|
+
# of virtual machine instance IDs from the VM scale set.
|
1594
1548
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1595
1549
|
# will be added to the HTTP request.
|
1596
1550
|
#
|
@@ -1601,13 +1555,13 @@ module Azure::ARM::Compute
|
|
1601
1555
|
end
|
1602
1556
|
|
1603
1557
|
#
|
1604
|
-
#
|
1605
|
-
# set.
|
1558
|
+
# Upgrades one or more virtual machines to the latest SKU set in the VM scale
|
1559
|
+
# set model.
|
1606
1560
|
#
|
1607
1561
|
# @param resource_group_name [String] The name of the resource group.
|
1608
|
-
# @param vm_scale_set_name [String] The name of the
|
1609
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs]
|
1610
|
-
#
|
1562
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1563
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
1564
|
+
# of virtual machine instance IDs from the VM scale set.
|
1611
1565
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1612
1566
|
# will be added to the HTTP request.
|
1613
1567
|
#
|
@@ -1618,13 +1572,13 @@ module Azure::ARM::Compute
|
|
1618
1572
|
end
|
1619
1573
|
|
1620
1574
|
#
|
1621
|
-
#
|
1622
|
-
# set.
|
1575
|
+
# Upgrades one or more virtual machines to the latest SKU set in the VM scale
|
1576
|
+
# set model.
|
1623
1577
|
#
|
1624
1578
|
# @param resource_group_name [String] The name of the resource group.
|
1625
|
-
# @param vm_scale_set_name [String] The name of the
|
1626
|
-
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs]
|
1627
|
-
#
|
1579
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1580
|
+
# @param vm_instance_ids [VirtualMachineScaleSetVMInstanceRequiredIDs] A list
|
1581
|
+
# of virtual machine instance IDs from the VM scale set.
|
1628
1582
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1629
1583
|
# to the HTTP request.
|
1630
1584
|
#
|
@@ -1683,50 +1637,11 @@ module Azure::ARM::Compute
|
|
1683
1637
|
end
|
1684
1638
|
|
1685
1639
|
#
|
1686
|
-
#
|
1687
|
-
#
|
1688
|
-
#
|
1689
|
-
# @param resource_group_name [String] The name of the resource group.
|
1690
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1691
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1692
|
-
# will be added to the HTTP request.
|
1693
|
-
#
|
1694
|
-
def reimage(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1695
|
-
response = reimage_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
1696
|
-
nil
|
1697
|
-
end
|
1698
|
-
|
1699
|
-
#
|
1700
|
-
# @param resource_group_name [String] The name of the resource group.
|
1701
|
-
# @param vm_scale_set_name [String] The name of the virtual machine scale set.
|
1702
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1703
|
-
# will be added to the HTTP request.
|
1704
|
-
#
|
1705
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
1706
|
-
# response.
|
1707
|
-
#
|
1708
|
-
def reimage_async(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
1709
|
-
# Send request
|
1710
|
-
promise = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers)
|
1711
|
-
|
1712
|
-
promise = promise.then do |response|
|
1713
|
-
# Defining deserialization method.
|
1714
|
-
deserialize_method = lambda do |parsed_response|
|
1715
|
-
end
|
1716
|
-
|
1717
|
-
# Waiting for response.
|
1718
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
1719
|
-
end
|
1720
|
-
|
1721
|
-
promise
|
1722
|
-
end
|
1723
|
-
|
1724
|
-
#
|
1725
|
-
# Allows you to re-image(update the version of the installed operating system)
|
1726
|
-
# virtual machines in a virtual machine scale set.
|
1640
|
+
# Reimages (upgrade the operating system) one or more virtual machines in a VM
|
1641
|
+
# scale set.
|
1727
1642
|
#
|
1728
1643
|
# @param resource_group_name [String] The name of the resource group.
|
1729
|
-
# @param vm_scale_set_name [String] The name of the
|
1644
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1730
1645
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1731
1646
|
# will be added to the HTTP request.
|
1732
1647
|
#
|
@@ -1737,11 +1652,11 @@ module Azure::ARM::Compute
|
|
1737
1652
|
end
|
1738
1653
|
|
1739
1654
|
#
|
1740
|
-
#
|
1741
|
-
#
|
1655
|
+
# Reimages (upgrade the operating system) one or more virtual machines in a VM
|
1656
|
+
# scale set.
|
1742
1657
|
#
|
1743
1658
|
# @param resource_group_name [String] The name of the resource group.
|
1744
|
-
# @param vm_scale_set_name [String] The name of the
|
1659
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1745
1660
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1746
1661
|
# will be added to the HTTP request.
|
1747
1662
|
#
|
@@ -1752,11 +1667,11 @@ module Azure::ARM::Compute
|
|
1752
1667
|
end
|
1753
1668
|
|
1754
1669
|
#
|
1755
|
-
#
|
1756
|
-
#
|
1670
|
+
# Reimages (upgrade the operating system) one or more virtual machines in a VM
|
1671
|
+
# scale set.
|
1757
1672
|
#
|
1758
1673
|
# @param resource_group_name [String] The name of the resource group.
|
1759
|
-
# @param vm_scale_set_name [String] The name of the
|
1674
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
1760
1675
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1761
1676
|
# to the HTTP request.
|
1762
1677
|
#
|
@@ -1805,10 +1720,10 @@ module Azure::ARM::Compute
|
|
1805
1720
|
end
|
1806
1721
|
|
1807
1722
|
#
|
1808
|
-
#
|
1723
|
+
# Gets a list of all VM scale sets under a resource group.
|
1809
1724
|
#
|
1810
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1811
|
-
#
|
1725
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1726
|
+
# to List operation.
|
1812
1727
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1813
1728
|
# will be added to the HTTP request.
|
1814
1729
|
#
|
@@ -1820,10 +1735,10 @@ module Azure::ARM::Compute
|
|
1820
1735
|
end
|
1821
1736
|
|
1822
1737
|
#
|
1823
|
-
#
|
1738
|
+
# Gets a list of all VM scale sets under a resource group.
|
1824
1739
|
#
|
1825
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1826
|
-
#
|
1740
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1741
|
+
# to List operation.
|
1827
1742
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1828
1743
|
# will be added to the HTTP request.
|
1829
1744
|
#
|
@@ -1834,10 +1749,10 @@ module Azure::ARM::Compute
|
|
1834
1749
|
end
|
1835
1750
|
|
1836
1751
|
#
|
1837
|
-
#
|
1752
|
+
# Gets a list of all VM scale sets under a resource group.
|
1838
1753
|
#
|
1839
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1840
|
-
#
|
1754
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1755
|
+
# to List operation.
|
1841
1756
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1842
1757
|
# to the HTTP request.
|
1843
1758
|
#
|
@@ -1892,13 +1807,13 @@ module Azure::ARM::Compute
|
|
1892
1807
|
end
|
1893
1808
|
|
1894
1809
|
#
|
1895
|
-
#
|
1896
|
-
# property in the response to get the
|
1897
|
-
# Sets. Do this till nextLink is not null to fetch all
|
1898
|
-
# Scale Sets.
|
1810
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
1811
|
+
# associated resource group. Use nextLink property in the response to get the
|
1812
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
1813
|
+
# the VM Scale Sets.
|
1899
1814
|
#
|
1900
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1901
|
-
#
|
1815
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1816
|
+
# to List operation.
|
1902
1817
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1903
1818
|
# will be added to the HTTP request.
|
1904
1819
|
#
|
@@ -1910,13 +1825,13 @@ module Azure::ARM::Compute
|
|
1910
1825
|
end
|
1911
1826
|
|
1912
1827
|
#
|
1913
|
-
#
|
1914
|
-
# property in the response to get the
|
1915
|
-
# Sets. Do this till nextLink is not null to fetch all
|
1916
|
-
# Scale Sets.
|
1828
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
1829
|
+
# associated resource group. Use nextLink property in the response to get the
|
1830
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
1831
|
+
# the VM Scale Sets.
|
1917
1832
|
#
|
1918
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1919
|
-
#
|
1833
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1834
|
+
# to List operation.
|
1920
1835
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1921
1836
|
# will be added to the HTTP request.
|
1922
1837
|
#
|
@@ -1927,13 +1842,13 @@ module Azure::ARM::Compute
|
|
1927
1842
|
end
|
1928
1843
|
|
1929
1844
|
#
|
1930
|
-
#
|
1931
|
-
# property in the response to get the
|
1932
|
-
# Sets. Do this till nextLink is not null to fetch all
|
1933
|
-
# Scale Sets.
|
1845
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
1846
|
+
# associated resource group. Use nextLink property in the response to get the
|
1847
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
1848
|
+
# the VM Scale Sets.
|
1934
1849
|
#
|
1935
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1936
|
-
#
|
1850
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1851
|
+
# to List operation.
|
1937
1852
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1938
1853
|
# to the HTTP request.
|
1939
1854
|
#
|
@@ -1988,11 +1903,11 @@ module Azure::ARM::Compute
|
|
1988
1903
|
end
|
1989
1904
|
|
1990
1905
|
#
|
1991
|
-
#
|
1992
|
-
#
|
1906
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
1907
|
+
# and maximum VM instances allowed for each SKU.
|
1993
1908
|
#
|
1994
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
1995
|
-
#
|
1909
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1910
|
+
# to List operation.
|
1996
1911
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1997
1912
|
# will be added to the HTTP request.
|
1998
1913
|
#
|
@@ -2004,11 +1919,11 @@ module Azure::ARM::Compute
|
|
2004
1919
|
end
|
2005
1920
|
|
2006
1921
|
#
|
2007
|
-
#
|
2008
|
-
#
|
1922
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
1923
|
+
# and maximum VM instances allowed for each SKU.
|
2009
1924
|
#
|
2010
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
2011
|
-
#
|
1925
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1926
|
+
# to List operation.
|
2012
1927
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2013
1928
|
# will be added to the HTTP request.
|
2014
1929
|
#
|
@@ -2019,11 +1934,11 @@ module Azure::ARM::Compute
|
|
2019
1934
|
end
|
2020
1935
|
|
2021
1936
|
#
|
2022
|
-
#
|
2023
|
-
#
|
1937
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
1938
|
+
# and maximum VM instances allowed for each SKU.
|
2024
1939
|
#
|
2025
|
-
# @param next_page_link [String] The NextLink from the previous successful
|
2026
|
-
#
|
1940
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
1941
|
+
# to List operation.
|
2027
1942
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
2028
1943
|
# to the HTTP request.
|
2029
1944
|
#
|
@@ -2077,5 +1992,72 @@ module Azure::ARM::Compute
|
|
2077
1992
|
promise.execute
|
2078
1993
|
end
|
2079
1994
|
|
1995
|
+
#
|
1996
|
+
# Gets a list of all VM scale sets under a resource group.
|
1997
|
+
#
|
1998
|
+
# @param resource_group_name [String] The name of the resource group.
|
1999
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2000
|
+
# will be added to the HTTP request.
|
2001
|
+
#
|
2002
|
+
# @return [VirtualMachineScaleSetListResult] which provide lazy access to pages
|
2003
|
+
# of the response.
|
2004
|
+
#
|
2005
|
+
def list_as_lazy(resource_group_name, custom_headers = nil)
|
2006
|
+
response = list_async(resource_group_name, custom_headers).value!
|
2007
|
+
unless response.nil?
|
2008
|
+
page = response.body
|
2009
|
+
page.next_method = Proc.new do |next_page_link|
|
2010
|
+
list_next_async(next_page_link, custom_headers)
|
2011
|
+
end
|
2012
|
+
page
|
2013
|
+
end
|
2014
|
+
end
|
2015
|
+
|
2016
|
+
#
|
2017
|
+
# Gets a list of all VM Scale Sets in the subscription, regardless of the
|
2018
|
+
# associated resource group. Use nextLink property in the response to get the
|
2019
|
+
# next page of VM Scale Sets. Do this till nextLink is not null to fetch all
|
2020
|
+
# the VM Scale Sets.
|
2021
|
+
#
|
2022
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2023
|
+
# will be added to the HTTP request.
|
2024
|
+
#
|
2025
|
+
# @return [VirtualMachineScaleSetListWithLinkResult] which provide lazy access
|
2026
|
+
# to pages of the response.
|
2027
|
+
#
|
2028
|
+
def list_all_as_lazy(custom_headers = nil)
|
2029
|
+
response = list_all_async(custom_headers).value!
|
2030
|
+
unless response.nil?
|
2031
|
+
page = response.body
|
2032
|
+
page.next_method = Proc.new do |next_page_link|
|
2033
|
+
list_all_next_async(next_page_link, custom_headers)
|
2034
|
+
end
|
2035
|
+
page
|
2036
|
+
end
|
2037
|
+
end
|
2038
|
+
|
2039
|
+
#
|
2040
|
+
# Gets a list of SKUs available for your VM scale set, including the minimum
|
2041
|
+
# and maximum VM instances allowed for each SKU.
|
2042
|
+
#
|
2043
|
+
# @param resource_group_name [String] The name of the resource group.
|
2044
|
+
# @param vm_scale_set_name [String] The name of the VM scale set.
|
2045
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
2046
|
+
# will be added to the HTTP request.
|
2047
|
+
#
|
2048
|
+
# @return [VirtualMachineScaleSetListSkusResult] which provide lazy access to
|
2049
|
+
# pages of the response.
|
2050
|
+
#
|
2051
|
+
def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers = nil)
|
2052
|
+
response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers).value!
|
2053
|
+
unless response.nil?
|
2054
|
+
page = response.body
|
2055
|
+
page.next_method = Proc.new do |next_page_link|
|
2056
|
+
list_skus_next_async(next_page_link, custom_headers)
|
2057
|
+
end
|
2058
|
+
page
|
2059
|
+
end
|
2060
|
+
end
|
2061
|
+
|
2080
2062
|
end
|
2081
2063
|
end
|