Class: Azure::Compute::Mgmt::V2016_03_30::VirtualMachineScaleSets
- Inherits:
-
Object
- Object
- Azure::Compute::Mgmt::V2016_03_30::VirtualMachineScaleSets
- Includes:
- MsRestAzure
- Defined in:
- lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb
Overview
Compute Client
Instance Attribute Summary collapse
-
#client ⇒ ComputeManagementClient
readonly
Reference to the ComputeManagementClient.
Instance Method Summary collapse
-
#begin_create_or_update(resource_group_name, name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
-
#begin_create_or_update_async(resource_group_name, name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create or update a VM scale set.
-
#begin_create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a VM scale set.
-
#begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Deallocates specific virtual machines in a VM scale set.
-
#begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Deallocates specific virtual machines in a VM scale set.
-
#begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deallocates specific virtual machines in a VM scale set.
-
#begin_delete(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Deletes a VM scale set.
-
#begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a VM scale set.
-
#begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Deletes virtual machines in a VM scale set.
-
#begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
Deletes virtual machines in a VM scale set.
-
#begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes virtual machines in a VM scale set.
-
#begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a VM scale set.
-
#begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Power off (stop) one or more virtual machines in a VM scale set.
-
#begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Power off (stop) one or more virtual machines in a VM scale set.
-
#begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Power off (stop) one or more virtual machines in a VM scale set.
-
#begin_reimage(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
-
#begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
-
#begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
-
#begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Restarts one or more virtual machines in a VM scale set.
-
#begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Restarts one or more virtual machines in a VM scale set.
-
#begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Restarts one or more virtual machines in a VM scale set.
-
#begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Starts one or more virtual machines in a VM scale set.
-
#begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Starts one or more virtual machines in a VM scale set.
-
#begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Starts one or more virtual machines in a VM scale set.
-
#begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
-
#begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
-
#begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
-
#create_or_update(resource_group_name, name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
-
#create_or_update_async(resource_group_name, name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Deallocates specific virtual machines in a VM scale set.
-
#deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set.
-
#delete(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Deletes a VM scale set.
-
#delete_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Deletes virtual machines in a VM scale set.
-
#delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
of virtual machine instance IDs from the VM scale set.
-
#get(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSet
Display information about a virtual machine scale set.
-
#get_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Display information about a virtual machine scale set.
-
#get_instance_view(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSetInstanceView
Gets the status of a VM scale set instance.
-
#get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the status of a VM scale set instance.
-
#get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the status of a VM scale set instance.
-
#get_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Display information about a virtual machine scale set.
-
#initialize(client) ⇒ VirtualMachineScaleSets
constructor
Creates and initializes a new instance of the VirtualMachineScaleSets class.
-
#list(resource_group_name, custom_headers: nil) ⇒ Array<VirtualMachineScaleSet>
Gets a list of all VM scale sets under a resource group.
-
#list_all(custom_headers: nil) ⇒ Array<VirtualMachineScaleSet>
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_all_as_lazy(custom_headers: nil) ⇒ VirtualMachineScaleSetListWithLinkResult
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_all_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_all_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListWithLinkResult
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_all_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_all_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_all_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group.
-
#list_as_lazy(resource_group_name, custom_headers: nil) ⇒ VirtualMachineScaleSetListResult
Gets a list of all VM scale sets under a resource group.
-
#list_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM scale sets under a resource group.
-
#list_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListResult
Gets a list of all VM scale sets under a resource group.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM scale sets under a resource group.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM scale sets under a resource group.
-
#list_skus(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Array<VirtualMachineScaleSetSku>
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSetListSkusResult
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_skus_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_skus_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListSkusResult
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_skus_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_skus_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_skus_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
-
#list_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM scale sets under a resource group.
-
#power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Power off (stop) one or more virtual machines in a VM scale set.
-
#power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set.
-
#reimage(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
-
#reimage_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Restarts one or more virtual machines in a VM scale set.
-
#restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set.
-
#start(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Starts one or more virtual machines in a VM scale set.
-
#start_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set.
-
#update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
-
#update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
of virtual machine instance IDs from the VM scale set.
Constructor Details
#initialize(client) ⇒ VirtualMachineScaleSets
Creates and initializes a new instance of the VirtualMachineScaleSets class.
17 18 19 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ComputeManagementClient (readonly)
Returns reference to the ComputeManagementClient.
22 23 24 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 22 def client @client end |
Instance Method Details
#begin_create_or_update(resource_group_name, name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
will be added to the HTTP request.
915 916 917 918 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 915 def begin_create_or_update(resource_group_name, name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create or update a VM scale set.
to the HTTP request.
946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 946 def begin_create_or_update_async(resource_group_name, name, parameters, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'name is nil' if name.nil? fail ArgumentError, 'parameters is nil' if parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSet.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSet.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSet.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a VM scale set.
will be added to the HTTP request.
931 932 933 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 931 def begin_create_or_update_with_http_info(resource_group_name, name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, name, parameters, custom_headers:custom_headers).value! end |
#begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1127 1128 1129 1130 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1127 def begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
virtual machine instance IDs from the VM scale set. to the HTTP request.
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1164 def begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetVMInstanceIDs.mapper() request_content = @client.serialize(request_mapper, vm_instance_ids) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1146 1147 1148 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1146 def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Deletes a VM scale set.
will be added to the HTTP request.
1029 1030 1031 1032 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1029 def begin_delete(resource_group_name, vm_scale_set_name, custom_headers:nil) response = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a VM scale set.
to the HTTP request.
1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1058 def begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Deletes virtual machines in a VM scale set.
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1238 1239 1240 1241 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1238 def begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) response = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
Deletes virtual machines in a VM scale set.
of virtual machine instance IDs from the VM scale set. to the HTTP request.
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1271 def begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper() request_content = @client.serialize(request_mapper, vm_instance_ids) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes virtual machines in a VM scale set.
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1255 1256 1257 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1255 def begin_delete_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a VM scale set.
will be added to the HTTP request.
1044 1045 1046 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1044 def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil) begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! end |
#begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1348 1349 1350 1351 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1348 def begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
virtual machine instance IDs from the VM scale set. to the HTTP request.
1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1385 def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetVMInstanceIDs.mapper() request_content = @client.serialize(request_mapper, vm_instance_ids) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1367 1368 1369 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1367 def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_reimage(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
will be added to the HTTP request.
1783 1784 1785 1786 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1783 def begin_reimage(resource_group_name, vm_scale_set_name, custom_headers:nil) response = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
to the HTTP request.
1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1814 def begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
will be added to the HTTP request.
1799 1800 1801 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1799 def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil) begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! end |
#begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Restarts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1459 1460 1461 1462 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1459 def begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Restarts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. to the HTTP request.
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1492 def begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetVMInstanceIDs.mapper() request_content = @client.serialize(request_mapper, vm_instance_ids) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Restarts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1476 1477 1478 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1476 def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Starts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1566 1567 1568 1569 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1566 def begin_start(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Starts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. to the HTTP request.
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1599 def begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetVMInstanceIDs.mapper() request_content = @client.serialize(request_mapper, vm_instance_ids) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Starts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1583 1584 1585 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1583 def begin_start_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1674 1675 1676 1677 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1674 def begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) response = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
of virtual machine instance IDs from the VM scale set. to the HTTP request.
1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1709 def begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, 'vm_instance_ids is nil' if vm_instance_ids.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetVMInstanceRequiredIDs.mapper() request_content = @client.serialize(request_mapper, vm_instance_ids) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1692 1693 1694 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1692 def begin_update_instances_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
will be added to the HTTP request.
35 36 37 38 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 35 def create_or_update(resource_group_name, name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 50 def create_or_update_async(resource_group_name, name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSet.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
218 219 220 221 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 218 def deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
response.
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 234 def deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#delete(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Deletes a VM scale set.
will be added to the HTTP request.
78 79 80 81 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 78 def delete(resource_group_name, vm_scale_set_name, custom_headers:nil) response = delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#delete_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 92 def delete_async(resource_group_name, vm_scale_set_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Deletes virtual machines in a VM scale set.
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
264 265 266 267 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 264 def delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) response = delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
response.
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 280 def delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) # Send request promise = begin_delete_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#get(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSet
Display information about a virtual machine scale set.
will be added to the HTTP request.
120 121 122 123 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 120 def get(resource_group_name, vm_scale_set_name, custom_headers:nil) response = get_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Display information about a virtual machine scale set.
to the HTTP request.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 149 def get_async(resource_group_name, vm_scale_set_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSet.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_instance_view(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSetInstanceView
Gets the status of a VM scale set instance.
will be added to the HTTP request.
308 309 310 311 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 308 def get_instance_view(resource_group_name, vm_scale_set_name, custom_headers:nil) response = get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the status of a VM scale set instance.
to the HTTP request.
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 337 def get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetInstanceView.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the status of a VM scale set instance.
will be added to the HTTP request.
323 324 325 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 323 def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil) get_instance_view_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Display information about a virtual machine scale set.
will be added to the HTTP request.
135 136 137 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 135 def get_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil) get_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! end |
#list(resource_group_name, custom_headers: nil) ⇒ Array<VirtualMachineScaleSet>
Gets a list of all VM scale sets under a resource group.
will be added to the HTTP request.
401 402 403 404 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 401 def list(resource_group_name, custom_headers:nil) first_page = list_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_all(custom_headers: nil) ⇒ Array<VirtualMachineScaleSet>
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
will be added to the HTTP request.
493 494 495 496 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 493 def list_all(custom_headers:nil) first_page = list_all_as_lazy(custom_headers:custom_headers) first_page.get_all_items end |
#list_all_as_lazy(custom_headers: nil) ⇒ VirtualMachineScaleSetListWithLinkResult
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
will be added to the HTTP request.
to pages of the response.
2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2184 def list_all_as_lazy(custom_headers:nil) response = list_all_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_all_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_all_async(custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
to the HTTP request.
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 524 def list_all_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetListWithLinkResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_all_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListWithLinkResult
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
to List operation. will be added to the HTTP request.
1972 1973 1974 1975 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1972 def list_all_next(next_page_link, custom_headers:nil) response = list_all_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_all_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
to List operation. to the HTTP request.
2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2007 def list_all_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetListWithLinkResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_all_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
to List operation. will be added to the HTTP request.
1990 1991 1992 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1990 def list_all_next_with_http_info(next_page_link, custom_headers:nil) list_all_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_all_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.
will be added to the HTTP request.
509 510 511 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 509 def list_all_with_http_info(custom_headers:nil) list_all_async(custom_headers:custom_headers).value! end |
#list_as_lazy(resource_group_name, custom_headers: nil) ⇒ VirtualMachineScaleSetListResult
Gets a list of all VM scale sets under a resource group.
will be added to the HTTP request.
of the response.
2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2161 def list_as_lazy(resource_group_name, custom_headers:nil) response = list_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM scale sets under a resource group.
to the HTTP request.
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 428 def list_async(resource_group_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListResult
Gets a list of all VM scale sets under a resource group.
to List operation. will be added to the HTTP request.
1879 1880 1881 1882 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1879 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all VM scale sets under a resource group.
to List operation. to the HTTP request.
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1908 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM scale sets under a resource group.
to List operation. will be added to the HTTP request.
1894 1895 1896 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1894 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_skus(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Array<VirtualMachineScaleSetSku>
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
will be added to the HTTP request.
588 589 590 591 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 588 def list_skus(resource_group_name, vm_scale_set_name, custom_headers:nil) first_page = list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSetListSkusResult
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
will be added to the HTTP request.
pages of the response.
2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2207 def list_skus_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:nil) response = list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_skus_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_skus_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
to the HTTP request.
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 619 def list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'vm_scale_set_name is nil' if vm_scale_set_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'vmScaleSetName' => vm_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetListSkusResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_skus_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListSkusResult
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
to List operation. will be added to the HTTP request.
2069 2070 2071 2072 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2069 def list_skus_next(next_page_link, custom_headers:nil) response = list_skus_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_skus_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
to List operation. to the HTTP request.
2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2100 def list_skus_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::VirtualMachineScaleSetListSkusResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_skus_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
to List operation. will be added to the HTTP request.
2085 2086 2087 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2085 def list_skus_next_with_http_info(next_page_link, custom_headers:nil) list_skus_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_skus_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
will be added to the HTTP request.
604 605 606 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 604 def list_skus_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil) list_skus_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! end |
#list_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all VM scale sets under a resource group.
will be added to the HTTP request.
415 416 417 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 415 def list_with_http_info(resource_group_name, custom_headers:nil) list_async(resource_group_name, custom_headers:custom_headers).value! end |
#power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
688 689 690 691 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 688 def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
response.
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 704 def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#reimage(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ OperationStatusResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
will be added to the HTTP request.
872 873 874 875 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 872 def reimage(resource_group_name, vm_scale_set_name, custom_headers:nil) response = reimage_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#reimage_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 886 def reimage_async(resource_group_name, vm_scale_set_name, custom_headers:nil) # Send request promise = begin_reimage_async(resource_group_name, vm_scale_set_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Restarts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
734 735 736 737 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 734 def restart(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
response.
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 750 def restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_restart_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#start(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ OperationStatusResponse
Starts one or more virtual machines in a VM scale set.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
780 781 782 783 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 780 def start(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#start_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
response.
796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 796 def start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_start_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |
#update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ OperationStatusResponse
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
827 828 829 830 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 827 def update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) response = update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Concurrent::Promise
of virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
response.
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/2016-03-30/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 843 def update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:nil) # Send request promise = begin_update_instances_async(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2016_03_30::Models::OperationStatusResponse.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::AZURE_ASYNC_OPERATION) end promise end |