Interface VirtualMachines

All Superinterfaces:
HasInner<com.microsoft.azure.management.compute.implementation.VirtualMachinesInner>, HasManager<com.microsoft.azure.management.compute.implementation.ComputeManager>, SupportsBatchCreation<VirtualMachine>, SupportsBatchDeletion, SupportsCreating<VirtualMachine.DefinitionStages.Blank>, SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsGettingById<VirtualMachine>, SupportsGettingByResourceGroup<VirtualMachine>, SupportsListing<VirtualMachine>, SupportsListingByResourceGroup<VirtualMachine>

public interface VirtualMachines extends SupportsListing<VirtualMachine>, SupportsListingByResourceGroup<VirtualMachine>, SupportsGettingByResourceGroup<VirtualMachine>, SupportsGettingById<VirtualMachine>, SupportsCreating<VirtualMachine.DefinitionStages.Blank>, SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsBatchCreation<VirtualMachine>, SupportsBatchDeletion, HasManager<com.microsoft.azure.management.compute.implementation.ComputeManager>, HasInner<com.microsoft.azure.management.compute.implementation.VirtualMachinesInner>
Entry point to virtual machine management API.
  • Method Details

    • sizes

      Returns:
      available virtual machine sizes
    • deallocate

      void deallocate(String groupName, String name)
      Shuts down the virtual machine and releases the compute resources.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
    • deallocateAsync

      rx.Completable deallocateAsync(String groupName, String name)
      Shuts down the virtual machine and releases the compute resources asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • deallocateAsync

      com.microsoft.rest.ServiceFuture<Void> deallocateAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Shuts down the virtual machine and releases the compute resources asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • generalize

      void generalize(String groupName, String name)
      Generalizes the virtual machine.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
    • generalizeAsync

      rx.Completable generalizeAsync(String groupName, String name)
      Generalizes the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • generalizeAsync

      com.microsoft.rest.ServiceFuture<Void> generalizeAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Generalizes the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • powerOff

      void powerOff(String groupName, String name)
      Powers off (stops) a virtual machine.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
    • powerOffAsync

      rx.Completable powerOffAsync(String groupName, String name)
      Powers off (stops) the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • powerOffAsync

      com.microsoft.rest.ServiceFuture<Void> powerOffAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Powers off (stop) the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • restart

      void restart(String groupName, String name)
      Restarts a virtual machine.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
    • restartAsync

      rx.Completable restartAsync(String groupName, String name)
      Restarts the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • restartAsync

      com.microsoft.rest.ServiceFuture<Void> restartAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Restarts the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • start

      void start(String groupName, String name)
      Starts a virtual machine.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
    • startAsync

      rx.Completable startAsync(String groupName, String name)
      Starts the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • startAsync

      com.microsoft.rest.ServiceFuture<Void> startAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Starts the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • redeploy

      void redeploy(String groupName, String name)
      Redeploys a virtual machine.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
    • redeployAsync

      rx.Completable redeployAsync(String groupName, String name)
      Redeploys the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • redeployAsync

      com.microsoft.rest.ServiceFuture<Void> redeployAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Redeploys the virtual machine asynchronously.
      Parameters:
      groupName - the name of the resource group the virtual machine is in
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • capture

      String capture(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd)
      Captures the virtual machine by copying virtual hard disks of the VM and returns template as a JSON string that can be used to create similar VMs.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      containerName - destination container name to store the captured VHD
      vhdPrefix - the prefix for the VHD holding captured image
      overwriteVhd - whether to overwrites destination VHD if it exists
      Returns:
      the template as JSON string
    • captureAsync

      rx.Observable<String> captureAsync(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd)
      Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      containerName - destination container name to store the captured VHD
      vhdPrefix - the prefix for the VHD holding captured image
      overwriteVhd - whether to overwrites destination VHD if it exists
      Returns:
      a representation of the deferred computation of this call
    • captureAsync

      com.microsoft.rest.ServiceFuture<String> captureAsync(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd, com.microsoft.rest.ServiceCallback<String> callback)
      Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      containerName - destination container name to store the captured VHD
      vhdPrefix - the prefix for the VHD holding captured image
      overwriteVhd - whether to overwrites destination VHD if it exists
      callback - the callback to call on success or failure
      Returns:
      a representation of the deferred computation of this call
    • migrateToManaged

      void migrateToManaged(String groupName, String name)
      Migrates the virtual machine with unmanaged disks to use managed disks.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
    • migrateToManagedAsync

      rx.Completable migrateToManagedAsync(String groupName, String name)
      Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      Returns:
      a representation of the deferred computation of this call
    • migrateToManagedAsync

      com.microsoft.rest.ServiceFuture<Void> migrateToManagedAsync(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback)
      Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • runPowerShellScript

      RunCommandResult runPowerShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run shell script in a virtual machine.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      scriptLines - PowerShell script lines
      scriptParameters - script parameters
      Returns:
      result of PowerShell script execution
    • runPowerShellScriptAsync

      rx.Observable<RunCommandResult> runPowerShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run shell script in a virtual machine asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      scriptLines - PowerShell script lines
      scriptParameters - script parameters
      Returns:
      handle to the asynchronous execution
    • runShellScript

      RunCommandResult runShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run shell script in a virtual machine.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      scriptLines - shell script lines
      scriptParameters - script parameters
      Returns:
      result of shell script execution
    • runShellScriptAsync

      rx.Observable<RunCommandResult> runShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run shell script in a virtual machine asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      scriptLines - shell script lines
      scriptParameters - script parameters
      Returns:
      handle to the asynchronous execution
    • runCommand

      RunCommandResult runCommand(String groupName, String name, RunCommandInput inputCommand)
      Run commands in a virtual machine.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      inputCommand - command input
      Returns:
      result of execution
    • runCommandAsync

      rx.Observable<RunCommandResult> runCommandAsync(String groupName, String name, RunCommandInput inputCommand)
      Run commands in a virtual machine asynchronously.
      Parameters:
      groupName - the resource group name
      name - the virtual machine name
      inputCommand - command input
      Returns:
      handle to the asynchronous execution
    • deleteById

      void deleteById(String id, boolean forceDeletion)
      Force delete a resource from Azure, identifying it by its resource ID.
      Parameters:
      id - the resource ID of the resource to delete
      forceDeletion - force delete parameter
    • deleteByIdAsync

      com.microsoft.rest.ServiceFuture<Void> deleteByIdAsync(String id, boolean forceDeletion, com.microsoft.rest.ServiceCallback<Void> callback)
      Asynchronously force delete a resource from Azure, identifying it by its resource ID.
      Parameters:
      id - the resource ID of the resource to delete
      forceDeletion - force delete parameter
      callback - the callback on success or failure
      Returns:
      a handle to cancel the request
    • deleteByIdAsync

      rx.Completable deleteByIdAsync(String id, boolean forceDeletion)
      Asynchronously force delete a resource from Azure, identifying it by its resource ID.
      Parameters:
      id - the resource ID of the resource to delete
      forceDeletion - force delete parameter
      Returns:
      a representation of the deferred computation of this call
    • deleteByResourceGroup

      void deleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion)
      Force delete a resource from Azure, identifying it by its name and its resource group.
      Parameters:
      resourceGroupName - the resource group the resource is part of
      name - the name of the resource
      forceDeletion - force delete parameter
    • deleteByResourceGroupAsync

      com.microsoft.rest.ServiceFuture<Void> deleteByResourceGroupAsync(String resourceGroupName, String name, boolean forceDeletion, com.microsoft.rest.ServiceCallback<Void> callback)
      Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.
      Parameters:
      resourceGroupName - the resource group the resource is part of
      name - the name of the resource
      forceDeletion - force delete parameter
      callback - the callback to call on success or failure
      Returns:
      a handle to cancel the request
    • deleteByResourceGroupAsync

      rx.Completable deleteByResourceGroupAsync(String resourceGroupName, String name, boolean forceDeletion)
      Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.
      Parameters:
      resourceGroupName - the resource group the resource is part of
      name - the name of the resource
      forceDeletion - force delete parameter
      Returns:
      a representation of the deferred computation of this call