VirtualMachines interface
Interface representing a VirtualMachines.
Methods
begin |
Assess patches on the VM. |
begin |
Assess patches on the VM. |
begin |
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. |
begin |
Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. |
begin |
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. |
begin |
Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. |
begin |
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. |
begin |
The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. |
begin |
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. |
begin |
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. |
begin |
The operation to delete a virtual machine. |
begin |
The operation to delete a virtual machine. |
begin |
The operation to perform maintenance on a virtual machine. |
begin |
The operation to perform maintenance on a virtual machine. |
begin |
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. |
begin |
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. |
begin |
The operation to reapply a virtual machine's state. |
begin |
The operation to reapply a virtual machine's state. |
begin |
Shuts down the virtual machine, moves it to a new node, and powers it back on. |
begin |
Shuts down the virtual machine, moves it to a new node, and powers it back on. |
begin |
Reimages the virtual machine which has an ephemeral OS disk back to its initial state. |
begin |
Reimages the virtual machine which has an ephemeral OS disk back to its initial state. |
begin |
The operation to restart a virtual machine. |
begin |
The operation to restart a virtual machine. |
begin |
The operation to start a virtual machine. |
begin |
The operation to start a virtual machine. |
begin |
The operation to update a virtual machine. |
begin |
The operation to update a virtual machine. |
generalize(string, string, Virtual |
Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual
machine before performing this operation. |
get(string, string, Virtual |
Retrieves information about the model view or the instance view of a virtual machine. |
instance |
Retrieves information about the run-time state of a virtual machine. |
list(string, Virtual |
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. |
list |
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. |
list |
Lists all available virtual machine sizes to which the specified virtual machine can be resized. |
list |
Gets all the virtual machines under the specified subscription for the specified location. |
retrieve |
The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. |
simulate |
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<PollerLike<PollOperationState<VirtualMachineAssessPatchesResult>, VirtualMachineAssessPatchesResult>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<VirtualMachineAssessPatchesResult>, VirtualMachineAssessPatchesResult>>
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.
The options parameters.
Returns
Promise<VirtualMachineAssessPatchesResult>
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<PollerLike<PollOperationState<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.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
The options parameters.
Returns
Promise<VirtualMachineCaptureResult>
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<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.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
The options parameters.
Returns
Promise<void>
beginPerformMaintenance(string, string, VirtualMachinesPerformMaintenanceOptionalParams)
The operation to perform maintenance on a virtual machine.
function beginPerformMaintenance(resourceGroupName: string, vmName: string, options?: VirtualMachinesPerformMaintenanceOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
The options parameters.
Returns
Promise<void>
beginReimage(string, string, VirtualMachinesReimageOptionalParams)
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
function beginReimage(resourceGroupName: string, vmName: string, options?: VirtualMachinesReimageOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<void>, void>>
beginReimageAndWait(string, string, VirtualMachinesReimageOptionalParams)
Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
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.
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<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
The options parameters.
Returns
Promise<void>
beginStart(string, string, VirtualMachinesStartOptionalParams)
The operation to start a virtual machine.
function beginStart(resourceGroupName: string, vmName: string, options?: VirtualMachinesStartOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group.
- vmName
-
string
The name of the virtual machine.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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<PollerLike<PollOperationState<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.
The options parameters.
Returns
Promise<PollerLike<@azure/core-lro.PollOperationState<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.
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.
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.
The options parameters.
Returns
Promise<VirtualMachineInstanceView>
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.
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
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.
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.
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.
The options parameters.
Returns
Promise<RetrieveBootDiagnosticsDataResult>
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.
The options parameters.
Returns
Promise<void>