VirtualMachines interface

Interface representing a VirtualMachines.

Methods

beginAssessPatches(string, string, VirtualMachinesAssessPatchesOptionalParams)

Assess patches on the VM.

beginAssessPatchesAndWait(string, string, VirtualMachinesAssessPatchesOptionalParams)

Assess patches on the VM.

beginAttachDetachDataDisks(string, string, AttachDetachDataDisksRequest, VirtualMachinesAttachDetachDataDisksOptionalParams)

Attach and detach data disks to/from the virtual machine.

beginAttachDetachDataDisksAndWait(string, string, AttachDetachDataDisksRequest, VirtualMachinesAttachDetachDataDisksOptionalParams)

Attach and detach data disks to/from the virtual machine.

beginCapture(string, string, VirtualMachineCaptureParameters, VirtualMachinesCaptureOptionalParams)

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

beginCaptureAndWait(string, string, VirtualMachineCaptureParameters, VirtualMachinesCaptureOptionalParams)

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

beginConvertToManagedDisks(string, string, VirtualMachinesConvertToManagedDisksOptionalParams)

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

beginConvertToManagedDisksAndWait(string, string, VirtualMachinesConvertToManagedDisksOptionalParams)

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

beginCreateOrUpdate(string, string, VirtualMachine, VirtualMachinesCreateOrUpdateOptionalParams)

The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.

beginCreateOrUpdateAndWait(string, string, VirtualMachine, VirtualMachinesCreateOrUpdateOptionalParams)

The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.

beginDeallocate(string, string, VirtualMachinesDeallocateOptionalParams)

Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

beginDeallocateAndWait(string, string, VirtualMachinesDeallocateOptionalParams)

Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

beginDelete(string, string, VirtualMachinesDeleteOptionalParams)

The operation to delete a virtual machine.

beginDeleteAndWait(string, string, VirtualMachinesDeleteOptionalParams)

The operation to delete a virtual machine.

beginInstallPatches(string, string, VirtualMachineInstallPatchesParameters, VirtualMachinesInstallPatchesOptionalParams)

Installs patches on the VM.

beginInstallPatchesAndWait(string, string, VirtualMachineInstallPatchesParameters, VirtualMachinesInstallPatchesOptionalParams)

Installs patches on the VM.

beginPerformMaintenance(string, string, VirtualMachinesPerformMaintenanceOptionalParams)

The operation to perform maintenance on a virtual machine.

beginPerformMaintenanceAndWait(string, string, VirtualMachinesPerformMaintenanceOptionalParams)

The operation to perform maintenance on a virtual machine.

beginPowerOff(string, string, VirtualMachinesPowerOffOptionalParams)

The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

beginPowerOffAndWait(string, string, VirtualMachinesPowerOffOptionalParams)

The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

beginReapply(string, string, VirtualMachinesReapplyOptionalParams)

The operation to reapply a virtual machine's state.

beginReapplyAndWait(string, string, VirtualMachinesReapplyOptionalParams)

The operation to reapply a virtual machine's state.

beginRedeploy(string, string, VirtualMachinesRedeployOptionalParams)

Shuts down the virtual machine, moves it to a new node, and powers it back on.

beginRedeployAndWait(string, string, VirtualMachinesRedeployOptionalParams)

Shuts down the virtual machine, moves it to a new node, and powers it back on.

beginReimage(string, string, VirtualMachinesReimageOptionalParams)

Reimages (upgrade the operating system) a virtual machine 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. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.

beginReimageAndWait(string, string, VirtualMachinesReimageOptionalParams)

Reimages (upgrade the operating system) a virtual machine 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. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.

beginRestart(string, string, VirtualMachinesRestartOptionalParams)

The operation to restart a virtual machine.

beginRestartAndWait(string, string, VirtualMachinesRestartOptionalParams)

The operation to restart a virtual machine.

beginRunCommand(string, string, RunCommandInput, VirtualMachinesRunCommandOptionalParams)

Run command on the VM.

beginRunCommandAndWait(string, string, RunCommandInput, VirtualMachinesRunCommandOptionalParams)

Run command on the VM.

beginStart(string, string, VirtualMachinesStartOptionalParams)

The operation to start a virtual machine.

beginStartAndWait(string, string, VirtualMachinesStartOptionalParams)

The operation to start a virtual machine.

beginUpdate(string, string, VirtualMachineUpdate, VirtualMachinesUpdateOptionalParams)

The operation to update a virtual machine.

beginUpdateAndWait(string, string, VirtualMachineUpdate, VirtualMachinesUpdateOptionalParams)

The operation to update a virtual machine.

generalize(string, string, VirtualMachinesGeneralizeOptionalParams)

Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to Create a managed image of a generalized VM in Azure. For Linux, please refer to How to create an image of a virtual machine or VHD.

get(string, string, VirtualMachinesGetOptionalParams)

Retrieves information about the model view or the instance view of a virtual machine.

instanceView(string, string, VirtualMachinesInstanceViewOptionalParams)

Retrieves information about the run-time state of a virtual machine.

list(string, VirtualMachinesListOptionalParams)

Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

listAll(VirtualMachinesListAllOptionalParams)

Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

listAvailableSizes(string, string, VirtualMachinesListAvailableSizesOptionalParams)

Lists all available virtual machine sizes to which the specified virtual machine can be resized.

listByLocation(string, VirtualMachinesListByLocationOptionalParams)

Gets all the virtual machines under the specified subscription for the specified location.

retrieveBootDiagnosticsData(string, string, VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams)

The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.

simulateEviction(string, string, VirtualMachinesSimulateEvictionOptionalParams)

The operation to simulate the eviction of spot virtual machine.

Method Details

beginAssessPatches(string, string, VirtualMachinesAssessPatchesOptionalParams)

Assess patches on the VM.

function beginAssessPatches(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise<SimplePollerLike<OperationState<VirtualMachineAssessPatchesResult>, VirtualMachineAssessPatchesResult>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesAssessPatchesOptionalParams

The options parameters.

Returns

beginAssessPatchesAndWait(string, string, VirtualMachinesAssessPatchesOptionalParams)

Assess patches on the VM.

function beginAssessPatchesAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesAssessPatchesOptionalParams): Promise<VirtualMachineAssessPatchesResult>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesAssessPatchesOptionalParams

The options parameters.

Returns

beginAttachDetachDataDisks(string, string, AttachDetachDataDisksRequest, VirtualMachinesAttachDetachDataDisksOptionalParams)

Attach and detach data disks to/from the virtual machine.

function beginAttachDetachDataDisks(resourceGroupName: string, vmName: string, parameters: AttachDetachDataDisksRequest, options?: VirtualMachinesAttachDetachDataDisksOptionalParams): Promise<SimplePollerLike<OperationState<StorageProfile>, StorageProfile>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
AttachDetachDataDisksRequest

Parameters supplied to the attach and detach data disks operation on the virtual machine.

options
VirtualMachinesAttachDetachDataDisksOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<StorageProfile>, StorageProfile>>

beginAttachDetachDataDisksAndWait(string, string, AttachDetachDataDisksRequest, VirtualMachinesAttachDetachDataDisksOptionalParams)

Attach and detach data disks to/from the virtual machine.

function beginAttachDetachDataDisksAndWait(resourceGroupName: string, vmName: string, parameters: AttachDetachDataDisksRequest, options?: VirtualMachinesAttachDetachDataDisksOptionalParams): Promise<StorageProfile>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
AttachDetachDataDisksRequest

Parameters supplied to the attach and detach data disks operation on the virtual machine.

options
VirtualMachinesAttachDetachDataDisksOptionalParams

The options parameters.

Returns

Promise<StorageProfile>

beginCapture(string, string, VirtualMachineCaptureParameters, VirtualMachinesCaptureOptionalParams)

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

function beginCapture(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise<SimplePollerLike<OperationState<VirtualMachineCaptureResult>, VirtualMachineCaptureResult>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
VirtualMachineCaptureParameters

Parameters supplied to the Capture Virtual Machine operation.

options
VirtualMachinesCaptureOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<VirtualMachineCaptureResult>, VirtualMachineCaptureResult>>

beginCaptureAndWait(string, string, VirtualMachineCaptureParameters, VirtualMachinesCaptureOptionalParams)

Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.

function beginCaptureAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachineCaptureParameters, options?: VirtualMachinesCaptureOptionalParams): Promise<VirtualMachineCaptureResult>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
VirtualMachineCaptureParameters

Parameters supplied to the Capture Virtual Machine operation.

options
VirtualMachinesCaptureOptionalParams

The options parameters.

Returns

beginConvertToManagedDisks(string, string, VirtualMachinesConvertToManagedDisksOptionalParams)

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

function beginConvertToManagedDisks(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesConvertToManagedDisksOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginConvertToManagedDisksAndWait(string, string, VirtualMachinesConvertToManagedDisksOptionalParams)

Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.

function beginConvertToManagedDisksAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesConvertToManagedDisksOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesConvertToManagedDisksOptionalParams

The options parameters.

Returns

Promise<void>

beginCreateOrUpdate(string, string, VirtualMachine, VirtualMachinesCreateOrUpdateOptionalParams)

The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.

function beginCreateOrUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<VirtualMachine>, VirtualMachine>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
VirtualMachine

Parameters supplied to the Create Virtual Machine operation.

options
VirtualMachinesCreateOrUpdateOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<VirtualMachine>, VirtualMachine>>

beginCreateOrUpdateAndWait(string, string, VirtualMachine, VirtualMachinesCreateOrUpdateOptionalParams)

The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.

function beginCreateOrUpdateAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachine, options?: VirtualMachinesCreateOrUpdateOptionalParams): Promise<VirtualMachine>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
VirtualMachine

Parameters supplied to the Create Virtual Machine operation.

options
VirtualMachinesCreateOrUpdateOptionalParams

The options parameters.

Returns

Promise<VirtualMachine>

beginDeallocate(string, string, VirtualMachinesDeallocateOptionalParams)

Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

function beginDeallocate(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesDeallocateOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginDeallocateAndWait(string, string, VirtualMachinesDeallocateOptionalParams)

Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.

function beginDeallocateAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeallocateOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesDeallocateOptionalParams

The options parameters.

Returns

Promise<void>

beginDelete(string, string, VirtualMachinesDeleteOptionalParams)

The operation to delete a virtual machine.

function beginDelete(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesDeleteOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginDeleteAndWait(string, string, VirtualMachinesDeleteOptionalParams)

The operation to delete a virtual machine.

function beginDeleteAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesDeleteOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesDeleteOptionalParams

The options parameters.

Returns

Promise<void>

beginInstallPatches(string, string, VirtualMachineInstallPatchesParameters, VirtualMachinesInstallPatchesOptionalParams)

Installs patches on the VM.

function beginInstallPatches(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise<SimplePollerLike<OperationState<VirtualMachineInstallPatchesResult>, VirtualMachineInstallPatchesResult>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

installPatchesInput
VirtualMachineInstallPatchesParameters

Input for InstallPatches as directly received by the API

options
VirtualMachinesInstallPatchesOptionalParams

The options parameters.

Returns

beginInstallPatchesAndWait(string, string, VirtualMachineInstallPatchesParameters, VirtualMachinesInstallPatchesOptionalParams)

Installs patches on the VM.

function beginInstallPatchesAndWait(resourceGroupName: string, vmName: string, installPatchesInput: VirtualMachineInstallPatchesParameters, options?: VirtualMachinesInstallPatchesOptionalParams): Promise<VirtualMachineInstallPatchesResult>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

installPatchesInput
VirtualMachineInstallPatchesParameters

Input for InstallPatches as directly received by the API

options
VirtualMachinesInstallPatchesOptionalParams

The options parameters.

Returns

beginPerformMaintenance(string, string, VirtualMachinesPerformMaintenanceOptionalParams)

The operation to perform maintenance on a virtual machine.

function beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesPerformMaintenanceOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginPerformMaintenanceAndWait(string, string, VirtualMachinesPerformMaintenanceOptionalParams)

The operation to perform maintenance on a virtual machine.

function beginPerformMaintenanceAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesPerformMaintenanceOptionalParams

The options parameters.

Returns

Promise<void>

beginPowerOff(string, string, VirtualMachinesPowerOffOptionalParams)

The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

function beginPowerOff(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesPowerOffOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginPowerOffAndWait(string, string, VirtualMachinesPowerOffOptionalParams)

The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.

function beginPowerOffAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesPowerOffOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesPowerOffOptionalParams

The options parameters.

Returns

Promise<void>

beginReapply(string, string, VirtualMachinesReapplyOptionalParams)

The operation to reapply a virtual machine's state.

function beginReapply(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesReapplyOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginReapplyAndWait(string, string, VirtualMachinesReapplyOptionalParams)

The operation to reapply a virtual machine's state.

function beginReapplyAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesReapplyOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesReapplyOptionalParams

The options parameters.

Returns

Promise<void>

beginRedeploy(string, string, VirtualMachinesRedeployOptionalParams)

Shuts down the virtual machine, moves it to a new node, and powers it back on.

function beginRedeploy(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesRedeployOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginRedeployAndWait(string, string, VirtualMachinesRedeployOptionalParams)

Shuts down the virtual machine, moves it to a new node, and powers it back on.

function beginRedeployAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesRedeployOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesRedeployOptionalParams

The options parameters.

Returns

Promise<void>

beginReimage(string, string, VirtualMachinesReimageOptionalParams)

Reimages (upgrade the operating system) a virtual machine 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. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.

function beginReimage(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesReimageOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginReimageAndWait(string, string, VirtualMachinesReimageOptionalParams)

Reimages (upgrade the operating system) a virtual machine 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. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.

function beginReimageAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesReimageOptionalParams

The options parameters.

Returns

Promise<void>

beginRestart(string, string, VirtualMachinesRestartOptionalParams)

The operation to restart a virtual machine.

function beginRestart(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesRestartOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginRestartAndWait(string, string, VirtualMachinesRestartOptionalParams)

The operation to restart a virtual machine.

function beginRestartAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesRestartOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesRestartOptionalParams

The options parameters.

Returns

Promise<void>

beginRunCommand(string, string, RunCommandInput, VirtualMachinesRunCommandOptionalParams)

Run command on the VM.

function beginRunCommand(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise<SimplePollerLike<OperationState<RunCommandResult>, RunCommandResult>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
RunCommandInput

Parameters supplied to the Run command operation.

options
VirtualMachinesRunCommandOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<RunCommandResult>, RunCommandResult>>

beginRunCommandAndWait(string, string, RunCommandInput, VirtualMachinesRunCommandOptionalParams)

Run command on the VM.

function beginRunCommandAndWait(resourceGroupName: string, vmName: string, parameters: RunCommandInput, options?: VirtualMachinesRunCommandOptionalParams): Promise<RunCommandResult>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
RunCommandInput

Parameters supplied to the Run command operation.

options
VirtualMachinesRunCommandOptionalParams

The options parameters.

Returns

Promise<RunCommandResult>

beginStart(string, string, VirtualMachinesStartOptionalParams)

The operation to start a virtual machine.

function beginStart(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesStartOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>

beginStartAndWait(string, string, VirtualMachinesStartOptionalParams)

The operation to start a virtual machine.

function beginStartAndWait(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesStartOptionalParams

The options parameters.

Returns

Promise<void>

beginUpdate(string, string, VirtualMachineUpdate, VirtualMachinesUpdateOptionalParams)

The operation to update a virtual machine.

function beginUpdate(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise<SimplePollerLike<OperationState<VirtualMachine>, VirtualMachine>>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
VirtualMachineUpdate

Parameters supplied to the Update Virtual Machine operation.

options
VirtualMachinesUpdateOptionalParams

The options parameters.

Returns

Promise<@azure/core-lro.SimplePollerLike<OperationState<VirtualMachine>, VirtualMachine>>

beginUpdateAndWait(string, string, VirtualMachineUpdate, VirtualMachinesUpdateOptionalParams)

The operation to update a virtual machine.

function beginUpdateAndWait(resourceGroupName: string, vmName: string, parameters: VirtualMachineUpdate, options?: VirtualMachinesUpdateOptionalParams): Promise<VirtualMachine>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

parameters
VirtualMachineUpdate

Parameters supplied to the Update Virtual Machine operation.

options
VirtualMachinesUpdateOptionalParams

The options parameters.

Returns

Promise<VirtualMachine>

generalize(string, string, VirtualMachinesGeneralizeOptionalParams)

Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to Create a managed image of a generalized VM in Azure. For Linux, please refer to How to create an image of a virtual machine or VHD.

function generalize(resourceGroupName: string, vmName: string, options?: VirtualMachinesGeneralizeOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesGeneralizeOptionalParams

The options parameters.

Returns

Promise<void>

get(string, string, VirtualMachinesGetOptionalParams)

Retrieves information about the model view or the instance view of a virtual machine.

function get(resourceGroupName: string, vmName: string, options?: VirtualMachinesGetOptionalParams): Promise<VirtualMachine>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesGetOptionalParams

The options parameters.

Returns

Promise<VirtualMachine>

instanceView(string, string, VirtualMachinesInstanceViewOptionalParams)

Retrieves information about the run-time state of a virtual machine.

function instanceView(resourceGroupName: string, vmName: string, options?: VirtualMachinesInstanceViewOptionalParams): Promise<VirtualMachineInstanceView>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesInstanceViewOptionalParams

The options parameters.

Returns

list(string, VirtualMachinesListOptionalParams)

Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.

function list(resourceGroupName: string, options?: VirtualMachinesListOptionalParams): PagedAsyncIterableIterator<VirtualMachine, VirtualMachine[], PageSettings>

Parameters

resourceGroupName

string

The name of the resource group.

options
VirtualMachinesListOptionalParams

The options parameters.

Returns

listAll(VirtualMachinesListAllOptionalParams)

Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.

function listAll(options?: VirtualMachinesListAllOptionalParams): PagedAsyncIterableIterator<VirtualMachine, VirtualMachine[], PageSettings>

Parameters

options
VirtualMachinesListAllOptionalParams

The options parameters.

Returns

listAvailableSizes(string, string, VirtualMachinesListAvailableSizesOptionalParams)

Lists all available virtual machine sizes to which the specified virtual machine can be resized.

function listAvailableSizes(resourceGroupName: string, vmName: string, options?: VirtualMachinesListAvailableSizesOptionalParams): PagedAsyncIterableIterator<VirtualMachineSize, VirtualMachineSize[], PageSettings>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesListAvailableSizesOptionalParams

The options parameters.

Returns

listByLocation(string, VirtualMachinesListByLocationOptionalParams)

Gets all the virtual machines under the specified subscription for the specified location.

function listByLocation(location: string, options?: VirtualMachinesListByLocationOptionalParams): PagedAsyncIterableIterator<VirtualMachine, VirtualMachine[], PageSettings>

Parameters

location

string

The location for which virtual machines under the subscription are queried.

options
VirtualMachinesListByLocationOptionalParams

The options parameters.

Returns

retrieveBootDiagnosticsData(string, string, VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams)

The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.

function retrieveBootDiagnosticsData(resourceGroupName: string, vmName: string, options?: VirtualMachinesRetrieveBootDiagnosticsDataOptionalParams): Promise<RetrieveBootDiagnosticsDataResult>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

Returns

simulateEviction(string, string, VirtualMachinesSimulateEvictionOptionalParams)

The operation to simulate the eviction of spot virtual machine.

function simulateEviction(resourceGroupName: string, vmName: string, options?: VirtualMachinesSimulateEvictionOptionalParams): Promise<void>

Parameters

resourceGroupName

string

The name of the resource group.

vmName

string

The name of the virtual machine.

options
VirtualMachinesSimulateEvictionOptionalParams

The options parameters.

Returns

Promise<void>