Class: Azure::Compute::Mgmt::V2019_03_01::VirtualMachineScaleSets
- Inherits:
-
Object
- Object
- Azure::Compute::Mgmt::V2019_03_01::VirtualMachineScaleSets
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-03-01/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, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
-
#begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create or update a VM scale set.
-
#begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_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) ⇒ Object
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) ⇒ Object
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) ⇒ Object
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_perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Perform maintenance on one or more virtual machines in a VM scale set.
-
#begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Perform maintenance on one or more virtual machines in a VM scale set.
-
#begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Perform maintenance on one or more virtual machines in a VM scale set.
-
#begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, custom_headers: nil) ⇒ Object
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, skip_shutdown: false, 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, skip_shutdown: false, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Power off (stop) one or more virtual machines in a VM scale set.
-
#begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
-
#begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
-
#begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
-
#begin_reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
-
#begin_reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set.
-
#begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set.
-
#begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set.
-
#begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Concurrent::Promise
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
-
#begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
-
#begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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) ⇒ Object
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(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Update a VM scale set.
-
#begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update a VM scale set.
-
#begin_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Object
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.
-
#begin_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update a VM scale set.
-
#convert_to_single_placement_group(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Object
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
-
#convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
-
#convert_to_single_placement_group_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
-
#create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
-
#create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
update.
-
#deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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) ⇒ Object
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) ⇒ Object
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.
-
#force_recovery_service_fabric_platform_update_domain_walk(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers: nil) ⇒ RecoveryWalkResponse
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
-
#force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers: nil) ⇒ Concurrent::Promise
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
-
#force_recovery_service_fabric_platform_update_domain_walk_with_http_info(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Manual platform update domain walk to update virtual machines in a service fabric virtual machine 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_osupgrade_history(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Array<UpgradeOperationHistoricalStatusInfo>
Gets list of OS upgrades on a VM scale set instance.
-
#get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSetListOSUpgradeHistory
Gets list of OS upgrades on a VM scale set instance.
-
#get_osupgrade_history_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets list of OS upgrades on a VM scale set instance.
-
#get_osupgrade_history_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListOSUpgradeHistory
Gets list of OS upgrades on a VM scale set instance.
-
#get_osupgrade_history_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets list of OS upgrades on a VM scale set instance.
-
#get_osupgrade_history_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of OS upgrades on a VM scale set instance.
-
#get_osupgrade_history_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of OS upgrades on 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.
-
#perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Perform maintenance on one or more virtual machines in a VM scale set.
-
#perform_maintenance_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.
-
#power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, custom_headers: nil) ⇒ Object
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, skip_shutdown: false, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set.
-
#redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
-
#redeploy_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, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
-
#reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set.
-
#reimage_all_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_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Concurrent::Promise
Parameters for Reimaging VM ScaleSet.
-
#restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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) ⇒ Object
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(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Update a VM scale set.
-
#update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
update.
-
#update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Object
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/2019-03-01/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/2019-03-01/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, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
update. will be added to the HTTP request.
1375 1376 1377 1378 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1375 def begin_create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) response = begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Create or update a VM scale set.
update. to the HTTP request.
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 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1408 def begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, 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, '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::V2019_03_01::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' => 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(: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::V2019_03_01::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::V2019_03_01::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, vm_scale_set_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Create or update a VM scale set.
update. will be added to the HTTP request.
1392 1393 1394 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1392 def begin_create_or_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) begin_create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! end |
#begin_deallocate(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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.
1685 1686 1687 1688 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1685 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! 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.
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 1771 1772 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1722 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::V2019_03_01::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? 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.
1704 1705 1706 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1704 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) ⇒ Object
Deletes a VM scale set.
will be added to the HTTP request.
1598 1599 1600 1601 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1598 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! 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.
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 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1627 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? result end promise.execute end |
#begin_delete_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Object
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.
1785 1786 1787 1788 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1785 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! 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.
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 1868 1869 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1818 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::V2019_03_01::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? 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.
1802 1803 1804 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1802 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.
1613 1614 1615 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1613 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_perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
2290 2291 2292 2293 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2290 def begin_perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end |
#begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
virtual machine instance IDs from the VM scale set. to the HTTP request.
2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2329 def begin_perform_maintenance_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::V2019_03_01::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}/performMaintenance' 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? result end promise.execute end |
#begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
2310 2311 2312 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2310 def begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, custom_headers: nil) ⇒ Object
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. shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified will be added to the HTTP request.
1888 1889 1890 1891 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1888 def begin_power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil) response = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value! nil end |
#begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, 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. shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified to the HTTP request.
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 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1933 def begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, 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::V2019_03_01::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: {'skipShutdown' => skip_shutdown,'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? result end promise.execute end |
#begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, 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. shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified will be added to the HTTP request.
1911 1912 1913 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1911 def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value! end |
#begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
2189 2190 2191 2192 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2189 def begin_redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end |
#begin_redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
virtual machine instance IDs from the VM scale set. to the HTTP request.
2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2224 def begin_redeploy_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::V2019_03_01::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}/redeploy' 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? result end promise.execute end |
#begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
2207 2208 2209 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2207 def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_redeploy_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, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Parameters for Reimaging VM ScaleSet. will be added to the HTTP request.
2494 2495 2496 2497 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2494 def begin_reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil) response = begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value! nil end |
#begin_reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
2595 2596 2597 2598 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2595 def begin_reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end |
#begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Concurrent::Promise
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
virtual machine instance IDs from the VM scale set. to the HTTP request.
2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2630 def begin_reimage_all_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::V2019_03_01::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}/reimageall' 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? result end promise.execute end |
#begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
2613 2614 2615 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2613 def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) begin_reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! end |
#begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Concurrent::Promise
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Parameters for Reimaging VM ScaleSet. to the HTTP request.
2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2531 def begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: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::V2019_03_01::Models::VirtualMachineScaleSetReimageParameters.mapper() request_content = @client.serialize(request_mapper, vm_scale_set_reimage_input) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : 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}, 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? result end promise.execute end |
#begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Parameters for Reimaging VM ScaleSet. will be added to the HTTP request.
2513 2514 2515 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2513 def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil) begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value! end |
#begin_restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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.
1996 1997 1998 1999 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1996 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! 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.
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 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2029 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::V2019_03_01::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? 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.
2013 2014 2015 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2013 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) ⇒ Object
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.
2092 2093 2094 2095 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2092 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! 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.
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 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2125 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::V2019_03_01::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? 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.
2109 2110 2111 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2109 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(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Update a VM scale set.
update. will be added to the HTTP request.
1493 1494 1495 1496 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1493 def begin_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) response = begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Update a VM scale set.
update. to the HTTP request.
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 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1526 def begin_update_async(resource_group_name, vm_scale_set_name, parameters, 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, '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::V2019_03_01::Models::VirtualMachineScaleSetUpdate.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' => 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(:patch, 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::V2019_03_01::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_update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Object
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.
2393 2394 2395 2396 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2393 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! 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.
2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2428 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::V2019_03_01::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? 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.
2411 2412 2413 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2411 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 |
#begin_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Update a VM scale set.
update. will be added to the HTTP request.
1510 1511 1512 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1510 def begin_update_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) begin_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! end |
#convert_to_single_placement_group(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Object
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
to create or update. object for ConvertToSinglePlacementGroup API. will be added to the HTTP request.
1275 1276 1277 1278 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1275 def convert_to_single_placement_group(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) response = convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! nil end |
#convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
to create or update. object for ConvertToSinglePlacementGroup API. to the HTTP request.
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1312 def convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, 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, 'parameters is nil' if parameters.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::V2019_03_01::Models::VMScaleSetConvertToSinglePlacementGroupInput.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}/convertToSinglePlacementGroup' 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}, 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 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? result end promise.execute end |
#convert_to_single_placement_group_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Converts SinglePlacementGroup property to false for a existing virtual machine scale set.
to create or update. object for ConvertToSinglePlacementGroup API. will be added to the HTTP request.
1294 1295 1296 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1294 def convert_to_single_placement_group_with_http_info(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) convert_to_single_placement_group_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! end |
#create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Create or update a VM scale set.
update. will be added to the HTTP request.
36 37 38 39 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 36 def create_or_update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) response = create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
update. will be added to the HTTP request.
response.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 52 def create_or_update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) # Send request promise = begin_create_or_update_async(resource_group_name, vm_scale_set_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::V2019_03_01::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) ⇒ Object
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.
260 261 262 263 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 260 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! 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.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 276 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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Object
Deletes a VM scale set.
will be added to the HTTP request.
124 125 126 127 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 124 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! nil end |
#delete_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 138 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| 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) ⇒ Object
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.
302 303 304 305 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 302 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! 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.
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 318 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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#force_recovery_service_fabric_platform_update_domain_walk(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers: nil) ⇒ RecoveryWalkResponse
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
a manual recovery walk is requested will be added to the HTTP request.
1171 1172 1173 1174 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1171 def force_recovery_service_fabric_platform_update_domain_walk(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil) response = force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value! response.body unless response.nil? end |
#force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers: nil) ⇒ Concurrent::Promise
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
a manual recovery walk is requested to the HTTP request.
1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1206 def force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, 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? fail ArgumentError, 'platform_update_domain is nil' if platform_update_domain.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}/forceRecoveryServiceFabricPlatformUpdateDomainWalk' 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,'platformUpdateDomain' => platform_update_domain}, 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 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::V2019_03_01::Models::RecoveryWalkResponse.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 |
#force_recovery_service_fabric_platform_update_domain_walk_with_http_info(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
a manual recovery walk is requested will be added to the HTTP request.
1189 1190 1191 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1189 def force_recovery_service_fabric_platform_update_domain_walk_with_http_info(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:nil) force_recovery_service_fabric_platform_update_domain_walk_async(resource_group_name, vm_scale_set_name, platform_update_domain, custom_headers:custom_headers).value! 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.
164 165 166 167 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 164 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.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 193 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::V2019_03_01::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.
344 345 346 347 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 344 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.
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 373 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::V2019_03_01::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.
359 360 361 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 359 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_osupgrade_history(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Array<UpgradeOperationHistoricalStatusInfo>
Gets list of OS upgrades on a VM scale set instance.
will be added to the HTTP request.
720 721 722 723 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 720 def get_osupgrade_history(resource_group_name, vm_scale_set_name, custom_headers:nil) first_page = get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:custom_headers) first_page.get_all_items end |
#get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ VirtualMachineScaleSetListOSUpgradeHistory
Gets list of OS upgrades on a VM scale set instance.
will be added to the HTTP request.
access to pages of the response.
3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 3132 def get_osupgrade_history_as_lazy(resource_group_name, vm_scale_set_name, custom_headers:nil) response = get_osupgrade_history_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| get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#get_osupgrade_history_async(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets list of OS upgrades on a VM scale set instance.
to the HTTP request.
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 749 def get_osupgrade_history_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}/osUpgradeHistory' 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::V2019_03_01::Models::VirtualMachineScaleSetListOSUpgradeHistory.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_osupgrade_history_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetListOSUpgradeHistory
Gets list of OS upgrades on a VM scale set instance.
to List operation. will be added to the HTTP request.
2974 2975 2976 2977 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2974 def get_osupgrade_history_next(next_page_link, custom_headers:nil) response = get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_osupgrade_history_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets list of OS upgrades on a VM scale set instance.
to List operation. to the HTTP request.
3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 3003 def get_osupgrade_history_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::V2019_03_01::Models::VirtualMachineScaleSetListOSUpgradeHistory.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_osupgrade_history_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of OS upgrades on a VM scale set instance.
to List operation. will be added to the HTTP request.
2989 2990 2991 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2989 def get_osupgrade_history_next_with_http_info(next_page_link, custom_headers:nil) get_osupgrade_history_next_async(next_page_link, custom_headers:custom_headers).value! end |
#get_osupgrade_history_with_http_info(resource_group_name, vm_scale_set_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets list of OS upgrades on a VM scale set instance.
will be added to the HTTP request.
735 736 737 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 735 def get_osupgrade_history_with_http_info(resource_group_name, vm_scale_set_name, custom_headers:nil) get_osupgrade_history_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.
179 180 181 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 179 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.
437 438 439 440 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 437 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.
529 530 531 532 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 529 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.
3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 3087 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.
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 560 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::V2019_03_01::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.
2785 2786 2787 2788 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2785 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.
2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2820 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::V2019_03_01::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.
2803 2804 2805 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2803 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.
545 546 547 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 545 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.
3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 3064 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.
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 464 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::V2019_03_01::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.
2692 2693 2694 2695 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2692 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.
2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2721 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::V2019_03_01::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.
2707 2708 2709 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2707 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.
624 625 626 627 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 624 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.
3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 3110 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.
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 655 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::V2019_03_01::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.
2882 2883 2884 2885 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2882 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.
2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2913 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::V2019_03_01::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.
2898 2899 2900 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 2898 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.
640 641 642 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 640 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.
451 452 453 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 451 def list_with_http_info(resource_group_name, custom_headers:nil) list_async(resource_group_name, custom_headers:custom_headers).value! end |
#perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
996 997 998 999 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 996 def perform_maintenance(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end |
#perform_maintenance_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.
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1012 def perform_maintenance_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_perform_maintenance_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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#power_off(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, custom_headers: nil) ⇒ Object
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. shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified will be added to the HTTP request.
820 821 822 823 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 820 def power_off(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil) response = power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers).value! nil end |
#power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, skip_shutdown: false, custom_headers: nil) ⇒ Concurrent::Promise
virtual machine instance IDs from the VM scale set. shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified will be added to the HTTP request.
response.
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 840 def power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, skip_shutdown:false, custom_headers:nil) # Send request promise = begin_power_off_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, skip_shutdown:skip_shutdown, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
951 952 953 954 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 951 def redeploy(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end |
#redeploy_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.
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 967 def redeploy_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_redeploy_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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
Parameters for Reimaging VM ScaleSet. will be added to the HTTP request.
1083 1084 1085 1086 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1083 def reimage(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil) response = reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers).value! nil end |
#reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.
virtual machine instance IDs from the VM scale set. will be added to the HTTP request.
1126 1127 1128 1129 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1126 def reimage_all(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) response = reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:vm_instance_ids, custom_headers:custom_headers).value! nil end |
#reimage_all_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.
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1142 def reimage_all_async(resource_group_name, vm_scale_set_name, vm_instance_ids:nil, custom_headers:nil) # Send request promise = begin_reimage_all_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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input: nil, custom_headers: nil) ⇒ Concurrent::Promise
Parameters for Reimaging VM ScaleSet. will be added to the HTTP request.
response.
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1099 def reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:nil, custom_headers:nil) # Send request promise = begin_reimage_async(resource_group_name, vm_scale_set_name, vm_scale_set_reimage_input:vm_scale_set_reimage_input, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#restart(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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.
866 867 868 869 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 866 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! 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.
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 882 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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#start(resource_group_name, vm_scale_set_name, vm_instance_ids: nil, custom_headers: nil) ⇒ Object
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.
908 909 910 911 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 908 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! 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.
924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 924 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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#update(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSet
Update a VM scale set.
update. will be added to the HTTP request.
82 83 84 85 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 82 def update(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) response = update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
update. will be added to the HTTP request.
response.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 98 def update_async(resource_group_name, vm_scale_set_name, parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, vm_scale_set_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::V2019_03_01::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 |
#update_instances(resource_group_name, vm_scale_set_name, vm_instance_ids, custom_headers: nil) ⇒ Object
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.
1039 1040 1041 1042 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1039 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! 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.
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 |
# File 'lib/2019-03-01/generated/azure_mgmt_compute/virtual_machine_scale_sets.rb', line 1055 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| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |