VirtualMachines Interface
Implements
public interface VirtualMachines
extends SupportsListing<VirtualMachine>, SupportsListingByResourceGroup<VirtualMachine>, SupportsGettingByResourceGroup<VirtualMachine>, SupportsGettingById<VirtualMachine>, SupportsCreating<Blank>, SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsBatchCreation<VirtualMachine>, SupportsBatchDeletion, HasManager<ComputeManager>
Entry point to virtual machine management API.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract Accepted<Void> |
beginDeleteById(String id)
Begins deleting a virtual machine from Azure, identifying it by its resource ID. |
abstract Accepted<Void> |
beginDeleteById(String id, boolean forceDeletion)
Begins force deleting a virtual machine from Azure, identifying it by its resource ID. |
abstract Accepted<Void> |
beginDeleteByResourceGroup(String resourceGroupName, String name)
Begins deleting a virtual machine from Azure, identifying it by its name and its resource group. |
abstract Accepted<Void> |
beginDeleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion)
Begins force deleting a virtual machine from Azure, identifying it by its name and its resource group. |
abstract 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. |
abstract Mono<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. |
abstract void |
deallocate(String groupName, String name)
Shuts down the virtual machine and releases the compute resources. |
abstract void |
deallocate(String groupName, String name, boolean hibernate)
Shuts down the virtual machine and releases the compute resources. |
abstract Mono<Void> |
deallocateAsync(String groupName, String name)
Shuts down the virtual machine and releases the compute resources asynchronously. |
abstract Mono<Void> |
deallocateAsync(String groupName, String name, boolean hibernate)
Shuts down the virtual machine and releases the compute resources asynchronously. |
abstract void |
deleteById(String id, boolean forceDeletion)
Force delete a resource from Azure, identifying it by its resource ID. |
abstract Mono<Void> |
deleteByIdAsync(String id, boolean forceDeletion)
Asynchronously force delete a resource from Azure, identifying it by its resource ID. |
abstract void |
deleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion)
Force delete a resource from Azure, identifying it by its name and its resource group. |
abstract Mono<Void> |
deleteByResourceGroupAsync(String resourceGroupName, String name, boolean forceDeletion)
Asynchronously force delete a resource from Azure, identifying it by its name and its resource group. |
abstract void |
generalize(String groupName, String name)
Generalizes the virtual machine. |
abstract Mono<Void> |
generalizeAsync(String groupName, String name)
Generalizes the virtual machine asynchronously. |
abstract
Paged |
listByVirtualMachineScaleSet(VirtualMachineScaleSet vmss)
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE. |
abstract
Paged |
listByVirtualMachineScaleSetAsync(VirtualMachineScaleSet vmss)
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE. |
abstract
Paged |
listByVirtualMachineScaleSetId(String vmssId)
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE. |
abstract
Paged |
listByVirtualMachineScaleSetIdAsync(String vmssId)
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE. |
abstract void |
migrateToManaged(String groupName, String name)
Migrates the virtual machine with unmanaged disks to use managed disks. |
abstract Mono<Void> |
migrateToManagedAsync(String groupName, String name)
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously. |
abstract void |
powerOff(String groupName, String name)
Powers off (stops) a virtual machine. |
abstract Mono<Void> |
powerOffAsync(String groupName, String name)
Powers off (stops) the virtual machine asynchronously. |
abstract void |
redeploy(String groupName, String name)
Redeploys a virtual machine. |
abstract Mono<Void> |
redeployAsync(String groupName, String name)
Redeploys the virtual machine asynchronously. |
abstract void |
restart(String groupName, String name)
Restarts a virtual machine. |
abstract Mono<Void> |
restartAsync(String groupName, String name)
Restarts the virtual machine asynchronously. |
abstract
Run |
runCommand(String groupName, String name, RunCommandInput inputCommand)
Run commands in a virtual machine. |
abstract
Mono<Run |
runCommandAsync(String groupName, String name, RunCommandInput inputCommand)
Run commands in a virtual machine asynchronously. |
abstract
Run |
runPowerShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine. |
abstract
Mono<Run |
runPowerShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine asynchronously. |
abstract
Run |
runShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine. |
abstract
Mono<Run |
runShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine asynchronously. |
abstract
Virtual |
sizes()
Gets available virtual machine sizes. |
abstract void |
start(String groupName, String name)
Starts a virtual machine. |
abstract Mono<Void> |
startAsync(String groupName, String name)
Starts the virtual machine asynchronously. |
Method Details
beginDeleteById
public abstract Accepted
Begins deleting a virtual machine from Azure, identifying it by its resource ID.
Parameters:
Returns:
beginDeleteById
public abstract Accepted
Begins force deleting a virtual machine from Azure, identifying it by its resource ID.
Parameters:
Returns:
beginDeleteByResourceGroup
public abstract Accepted
Begins deleting a virtual machine from Azure, identifying it by its name and its resource group.
Parameters:
Returns:
beginDeleteByResourceGroup
public abstract Accepted
Begins force deleting a virtual machine from Azure, identifying it by its name and its resource group.
Parameters:
Returns:
capture
public abstract 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:
Returns:
captureAsync
public abstract Mono
Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
Parameters:
Returns:
deallocate
public abstract void deallocate(String groupName, String name)
Shuts down the virtual machine and releases the compute resources.
Parameters:
deallocate
public abstract void deallocate(String groupName, String name, boolean hibernate)
Shuts down the virtual machine and releases the compute resources.
Parameters:
deallocateAsync
public abstract Mono
Shuts down the virtual machine and releases the compute resources asynchronously.
Parameters:
Returns:
deallocateAsync
public abstract Mono
Shuts down the virtual machine and releases the compute resources asynchronously.
Parameters:
Returns:
deleteById
public abstract void deleteById(String id, boolean forceDeletion)
Force delete a resource from Azure, identifying it by its resource ID.
Parameters:
deleteByIdAsync
public abstract Mono
Asynchronously force delete a resource from Azure, identifying it by its resource ID.
Parameters:
Returns:
deleteByResourceGroup
public abstract void deleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion)
Force delete a resource from Azure, identifying it by its name and its resource group.
Parameters:
deleteByResourceGroupAsync
public abstract Mono
Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.
Parameters:
Returns:
generalize
public abstract void generalize(String groupName, String name)
Generalizes the virtual machine.
Parameters:
generalizeAsync
public abstract Mono
Generalizes the virtual machine asynchronously.
Parameters:
Returns:
listByVirtualMachineScaleSet
public abstract PagedIterable
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE.
Note: This method is for FLEXIBLE virtual machine scale set. For UNIFORM scale sets, use virtualMachines().
Parameters:
Returns:
listByVirtualMachineScaleSetAsync
public abstract PagedFlux
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE.
Note: This method is for FLEXIBLE virtual machine scale set. For UNIFORM scale sets, use virtualMachines().
Parameters:
Returns:
listByVirtualMachineScaleSetId
public abstract PagedIterable
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE.
Note: This method is for FLEXIBLE virtual machine scale set. For UNIFORM scale sets, use virtualMachines().
Parameters:
Returns:
listByVirtualMachineScaleSetIdAsync
public abstract PagedFlux
Lists all the virtual machines by a certain virtual machine scale set with orchestration mode FLEXIBLE.
Note: This method is for FLEXIBLE virtual machine scale set. For UNIFORM scale sets, use virtualMachines().
Parameters:
Returns:
migrateToManaged
public abstract void migrateToManaged(String groupName, String name)
Migrates the virtual machine with unmanaged disks to use managed disks.
Parameters:
migrateToManagedAsync
public abstract Mono
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
Parameters:
Returns:
powerOff
public abstract void powerOff(String groupName, String name)
Powers off (stops) a virtual machine.
Parameters:
powerOffAsync
public abstract Mono
Powers off (stops) the virtual machine asynchronously.
Parameters:
Returns:
redeploy
public abstract void redeploy(String groupName, String name)
Redeploys a virtual machine.
Parameters:
redeployAsync
public abstract Mono
Redeploys the virtual machine asynchronously.
Parameters:
Returns:
restart
public abstract void restart(String groupName, String name)
Restarts a virtual machine.
Parameters:
restartAsync
public abstract Mono
Restarts the virtual machine asynchronously.
Parameters:
Returns:
runCommand
public abstract RunCommandResult runCommand(String groupName, String name, RunCommandInput inputCommand)
Run commands in a virtual machine.
Parameters:
Returns:
runCommandAsync
public abstract Mono
Run commands in a virtual machine asynchronously.
Parameters:
Returns:
runPowerShellScript
public abstract RunCommandResult runPowerShellScript(String groupName, String name, List
Run shell script in a virtual machine.
Parameters:
Returns:
runPowerShellScriptAsync
public abstract Mono
Run shell script in a virtual machine asynchronously.
Parameters:
Returns:
runShellScript
public abstract RunCommandResult runShellScript(String groupName, String name, List
Run shell script in a virtual machine.
Parameters:
Returns:
runShellScriptAsync
public abstract Mono
Run shell script in a virtual machine asynchronously.
Parameters:
Returns:
sizes
public abstract VirtualMachineSizes sizes()
Gets available virtual machine sizes.
Returns:
start
public abstract void start(String groupName, String name)
Starts a virtual machine.
Parameters:
startAsync
public abstract Mono
Starts the virtual machine asynchronously.
Parameters:
Returns: