Class: Azure::Compute::Mgmt::V2018_04_01::VirtualMachineScaleSetVMs
- Inherits:
-
Object
- Object
- Azure::Compute::Mgmt::V2018_04_01::VirtualMachineScaleSetVMs
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb
Overview
Compute Client
Instance Attribute Summary collapse
-
#client ⇒ ComputeManagementClient
readonly
Reference to the ComputeManagementClient.
Instance Method Summary collapse
-
#begin_deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deallocates a specific virtual machine in a VM scale set.
-
#begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Deallocates a specific virtual machine in a VM scale set.
-
#begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deallocates a specific virtual machine in a VM scale set.
-
#begin_delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deletes a virtual machine from a VM scale set.
-
#begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a virtual machine from a VM scale set.
-
#begin_delete_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a virtual machine from a VM scale set.
-
#begin_perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Performs maintenance on a virtual machine in a VM scale set.
-
#begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Performs maintenance on a virtual machine in a VM scale set.
-
#begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Performs maintenance on a virtual machine in a VM scale set.
-
#begin_power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Power off (stop) a virtual machine in a VM scale set.
-
#begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Power off (stop) a virtual machine in a VM scale set.
-
#begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Power off (stop) a virtual machine in a VM scale set.
-
#begin_redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Redeploys a virtual machine in a VM scale set.
-
#begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Redeploys a virtual machine in a VM scale set.
-
#begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Redeploys a virtual machine in a VM scale set.
-
#begin_reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
-
#begin_reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance.
-
#begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance.
-
#begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance.
-
#begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
-
#begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
-
#begin_restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Restarts a virtual machine in a VM scale set.
-
#begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Restarts a virtual machine in a VM scale set.
-
#begin_restart_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Restarts a virtual machine in a VM scale set.
-
#begin_run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ RunCommandResult
Run command on a virtual machine in a VM scale set.
-
#begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Run command on a virtual machine in a VM scale set.
-
#begin_run_command_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Run command on a virtual machine in a VM scale set.
-
#begin_start(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Starts a virtual machine in a VM scale set.
-
#begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Starts a virtual machine in a VM scale set.
-
#begin_start_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Starts a virtual machine in a VM scale set.
-
#begin_update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSetVM
Updates a virtual machine of a VM scale set.
-
#begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a virtual machine of a VM scale set.
-
#begin_update_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a virtual machine of a VM scale set.
-
#deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deallocates a specific virtual machine in a VM scale set.
-
#deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deletes a virtual machine from a VM scale set.
-
#delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#get(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ VirtualMachineScaleSetVM
Gets a virtual machine from a VM scale set.
-
#get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets a virtual machine from a VM scale set.
-
#get_instance_view(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ VirtualMachineScaleSetVMInstanceView
Gets the status of a virtual machine from a VM scale set.
-
#get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets the status of a virtual machine from a VM scale set.
-
#get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the status of a virtual machine from a VM scale set.
-
#get_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a virtual machine from a VM scale set.
-
#initialize(client) ⇒ VirtualMachineScaleSetVMs
constructor
Creates and initializes a new instance of the VirtualMachineScaleSetVMs class.
-
#list(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<VirtualMachineScaleSetVM>
Gets a list of all virtual machines in a VM scale sets.
-
#list_as_lazy(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ VirtualMachineScaleSetVMListResult
Gets a list of all virtual machines in a VM scale sets.
-
#list_async(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all virtual machines in a VM scale sets.
-
#list_next(next_page_link, custom_headers: nil) ⇒ VirtualMachineScaleSetVMListResult
Gets a list of all virtual machines in a VM scale sets.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all virtual machines in a VM scale sets.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all virtual machines in a VM scale sets.
-
#list_with_http_info(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all virtual machines in a VM scale sets.
-
#perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Performs maintenance on a virtual machine in a VM scale set.
-
#perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Power off (stop) a virtual machine in a VM scale set.
-
#power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Redeploys a virtual machine in a VM scale set.
-
#redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
-
#reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance.
-
#reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Restarts a virtual machine in a VM scale set.
-
#restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ RunCommandResult
Run command on a virtual machine in a VM scale set.
-
#run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation.
-
#start(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Starts a virtual machine in a VM scale set.
-
#start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
-
#update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSetVM
Updates a virtual machine of a VM scale set.
-
#update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
extension should be create or updated.
Constructor Details
#initialize(client) ⇒ VirtualMachineScaleSetVMs
Creates and initializes a new instance of the VirtualMachineScaleSetVMs class.
17 18 19 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.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/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 22 def client @client end |
Instance Method Details
#begin_deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.
will be added to the HTTP request.
981 982 983 984 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 981 def begin_deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.
to the HTTP request.
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1018 def begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.
will be added to the HTTP request.
1000 1001 1002 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1000 def begin_deallocate_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deletes a virtual machine from a VM scale set.
will be added to the HTTP request.
1199 1200 1201 1202 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1199 def begin_delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a virtual machine from a VM scale set.
to the HTTP request.
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 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1230 def begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}' 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,'instanceId' => instance_id,'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_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a virtual machine from a VM scale set.
will be added to the HTTP request.
1215 1216 1217 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1215 def begin_delete_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Performs maintenance on a virtual machine in a VM scale set.
will be added to the HTTP request.
1640 1641 1642 1643 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1640 def begin_perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Performs maintenance on a virtual machine in a VM scale set.
to the HTTP request.
1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1671 def begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Performs maintenance on a virtual machine in a VM scale set.
will be added to the HTTP request.
1656 1657 1658 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1656 def begin_perform_maintenance_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Power off (stop) a virtual machine 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.
will be added to the HTTP request.
1288 1289 1290 1291 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1288 def begin_power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Power off (stop) a virtual machine 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.
to the HTTP request.
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 1362 1363 1364 1365 1366 1367 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1323 def begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Power off (stop) a virtual machine 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.
will be added to the HTTP request.
1306 1307 1308 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1306 def begin_power_off_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Redeploys a virtual machine in a VM scale set.
will be added to the HTTP request.
1553 1554 1555 1556 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1553 def begin_redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Redeploys a virtual machine in a VM scale set.
to the HTTP request.
1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1584 def begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Redeploys a virtual machine in a VM scale set.
will be added to the HTTP request.
1569 1570 1571 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1569 def begin_redeploy_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
will be added to the HTTP request.
799 800 801 802 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 799 def begin_reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.
will be added to the HTTP request.
889 890 891 892 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 889 def begin_reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.
to the HTTP request.
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 922 def begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.
will be added to the HTTP request.
906 907 908 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 906 def begin_reimage_all_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
to the HTTP request.
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 832 def begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
will be added to the HTTP request.
816 817 818 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 816 def begin_reimage_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Restarts a virtual machine in a VM scale set.
will be added to the HTTP request.
1379 1380 1381 1382 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1379 def begin_restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Restarts a virtual machine in a VM scale set.
to the HTTP request.
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 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1410 def begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_restart_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Restarts a virtual machine in a VM scale set.
will be added to the HTTP request.
1395 1396 1397 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1395 def begin_restart_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ RunCommandResult
Run command on a virtual machine in a VM scale set.
operation. will be added to the HTTP request.
1730 1731 1732 1733 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1730 def begin_run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) response = begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Run command on a virtual machine in a VM scale set.
operation. to the HTTP request.
1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1765 def begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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::V2018_04_01::Models::RunCommandInput.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}/virtualmachines/{instanceId}/runCommand' 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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::RunCommandResult.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_run_command_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Run command on a virtual machine in a VM scale set.
operation. will be added to the HTTP request.
1748 1749 1750 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1748 def begin_run_command_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! end |
#begin_start(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Starts a virtual machine in a VM scale set.
will be added to the HTTP request.
1466 1467 1468 1469 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1466 def begin_start(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Starts a virtual machine in a VM scale set.
to the HTTP request.
1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1497 def begin_start_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_start_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Starts a virtual machine in a VM scale set.
will be added to the HTTP request.
1482 1483 1484 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1482 def begin_start_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) begin_start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSetVM
Updates a virtual machine of a VM scale set.
extension should be create or updated. Update Virtual Machine Scale Sets VM operation. will be added to the HTTP request.
1078 1079 1080 1081 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1078 def begin_update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) response = begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a virtual machine of a VM scale set.
extension should be create or updated. Update Virtual Machine Scale Sets VM operation. to the HTTP request.
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1115 def begin_update_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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::V2018_04_01::Models::VirtualMachineScaleSetVM.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}/virtualmachines/{instanceId}' 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,'instanceId' => instance_id,'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 == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineScaleSetVM.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 == 202 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineScaleSetVM.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_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a virtual machine of a VM scale set.
extension should be create or updated. Update Virtual Machine Scale Sets VM operation. will be added to the HTTP request.
1097 1098 1099 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1097 def begin_update_with_http_info(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! end |
#deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.
will be added to the HTTP request.
118 119 120 121 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 118 def deallocate(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 133 def deallocate_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_deallocate_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, custom_headers: nil) ⇒ Object
Deletes a virtual machine from a VM scale set.
will be added to the HTTP request.
208 209 210 211 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 208 def delete(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 223 def delete_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, vm_scale_set_name, instance_id, 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 |
#get(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ VirtualMachineScaleSetVM
Gets a virtual machine from a VM scale set.
will be added to the HTTP request.
250 251 252 253 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 250 def get(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets a virtual machine from a VM scale set.
to the HTTP request.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 281 def get_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}' 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,'instanceId' => instance_id,'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::V2018_04_01::Models::VirtualMachineScaleSetVM.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, instance_id, custom_headers: nil) ⇒ VirtualMachineScaleSetVMInstanceView
Gets the status of a virtual machine from a VM scale set.
will be added to the HTTP request.
348 349 350 351 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 348 def get_instance_view(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
Gets the status of a virtual machine from a VM scale set.
to the HTTP request.
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 427 428 429 430 431 432 433 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 379 def get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, 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, 'instance_id is nil' if instance_id.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}/virtualmachines/{instanceId}/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,'instanceId' => instance_id,'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::V2018_04_01::Models::VirtualMachineScaleSetVMInstanceView.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, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the status of a virtual machine from a VM scale set.
will be added to the HTTP request.
364 365 366 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 364 def get_instance_view_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) get_instance_view_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#get_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a virtual machine from a VM scale set.
will be added to the HTTP request.
266 267 268 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 266 def get_with_http_info(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) get_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! end |
#list(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Array<VirtualMachineScaleSetVM>
Gets a list of all virtual machines in a VM scale sets.
will be added to the HTTP request.
448 449 450 451 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 448 def list(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil) first_page = list_as_lazy(resource_group_name, virtual_machine_scale_set_name, filter:filter, select:select, expand:, custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ VirtualMachineScaleSetVMListResult
Gets a list of all virtual machines in a VM scale sets.
will be added to the HTTP request.
pages of the response.
1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1933 def list_as_lazy(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil) response = list_async(resource_group_name, virtual_machine_scale_set_name, filter:filter, select:select, expand:, 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, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ Concurrent::Promise
Gets a list of all virtual machines in a VM scale sets.
to the HTTP request.
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 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 483 def list_async(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil) fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, 'virtual_machine_scale_set_name is nil' if virtual_machine_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/{virtualMachineScaleSetName}/virtualMachines' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'resourceGroupName' => resource_group_name,'virtualMachineScaleSetName' => virtual_machine_scale_set_name,'subscriptionId' => @client.subscription_id}, query_params: {'$filter' => filter,'$select' => select,'$expand' => ,'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::V2018_04_01::Models::VirtualMachineScaleSetVMListResult.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) ⇒ VirtualMachineScaleSetVMListResult
Gets a list of all virtual machines in a VM scale sets.
to List operation. will be added to the HTTP request.
1839 1840 1841 1842 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1839 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 virtual machines in a VM scale sets.
to List operation. to the HTTP request.
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1868 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::V2018_04_01::Models::VirtualMachineScaleSetVMListResult.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 virtual machines in a VM scale sets.
to List operation. will be added to the HTTP request.
1854 1855 1856 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 1854 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_with_http_info(resource_group_name, virtual_machine_scale_set_name, filter: nil, select: nil, expand: nil, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets a list of all virtual machines in a VM scale sets.
will be added to the HTTP request.
466 467 468 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 466 def list_with_http_info(resource_group_name, virtual_machine_scale_set_name, filter:nil, select:nil, expand:nil, custom_headers:nil) list_async(resource_group_name, virtual_machine_scale_set_name, filter:filter, select:select, expand:, custom_headers:custom_headers).value! end |
#perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Performs maintenance on a virtual machine in a VM scale set.
will be added to the HTTP request.
709 710 711 712 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 709 def perform_maintenance(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 724 def perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_perform_maintenance_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, custom_headers: nil) ⇒ Object
Power off (stop) a virtual machine 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.
will be added to the HTTP request.
549 550 551 552 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 549 def power_off(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 564 def power_off_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_power_off_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, custom_headers: nil) ⇒ Object
Redeploys a virtual machine in a VM scale set.
will be added to the HTTP request.
669 670 671 672 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 669 def redeploy(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 684 def redeploy_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_redeploy_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, custom_headers: nil) ⇒ Object
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
will be added to the HTTP request.
34 35 36 37 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 34 def reimage(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.
will be added to the HTTP request.
75 76 77 78 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 75 def reimage_all(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 90 def reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_reimage_all_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 49 def reimage_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_reimage_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, custom_headers: nil) ⇒ Object
Restarts a virtual machine in a VM scale set.
will be added to the HTTP request.
589 590 591 592 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 589 def restart(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 604 def restart_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_restart_async(resource_group_name, vm_scale_set_name, instance_id, 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 |
#run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ RunCommandResult
Run command on a virtual machine in a VM scale set.
operation. will be added to the HTTP request.
753 754 755 756 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 753 def run_command(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) response = run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
operation. will be added to the HTTP request.
response.
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 770 def run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) # Send request promise = begin_run_command_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::RunCommandResult.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION) end promise end |
#start(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Object
Starts a virtual machine in a VM scale set.
will be added to the HTTP request.
629 630 631 632 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 629 def start(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) response = start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:custom_headers).value! nil end |
#start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers: nil) ⇒ Concurrent::Promise
will be added to the HTTP request.
response.
644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 644 def start_async(resource_group_name, vm_scale_set_name, instance_id, custom_headers:nil) # Send request promise = begin_start_async(resource_group_name, vm_scale_set_name, instance_id, 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, instance_id, parameters, custom_headers: nil) ⇒ VirtualMachineScaleSetVM
Updates a virtual machine of a VM scale set.
extension should be create or updated. Update Virtual Machine Scale Sets VM operation. will be added to the HTTP request.
163 164 165 166 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 163 def update(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) response = update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers: nil) ⇒ Concurrent::Promise
extension should be create or updated. Update Virtual Machine Scale Sets VM operation. will be added to the HTTP request.
response.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/2018-04-01/generated/azure_mgmt_compute/virtual_machine_scale_set_vms.rb', line 181 def update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, vm_scale_set_name, instance_id, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::Compute::Mgmt::V2018_04_01::Models::VirtualMachineScaleSetVM.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 |