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 Summary
Modifier and TypeMethodDescriptioncapture
(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.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.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.void
deallocate
(String groupName, String name) Shuts down the virtual machine and releases the compute resources.rx.Completable
deallocateAsync
(String groupName, String name) Shuts down the virtual machine and releases the compute resources asynchronously.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.void
deleteById
(String id, boolean forceDeletion) Force delete a resource from Azure, identifying it by its resource ID.rx.Completable
deleteByIdAsync
(String id, boolean forceDeletion) Asynchronously force delete a resource from Azure, identifying it by its resource ID.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.void
deleteByResourceGroup
(String resourceGroupName, String name, boolean forceDeletion) Force delete a resource from Azure, identifying it by its name and its resource group.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.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.void
generalize
(String groupName, String name) Generalizes the virtual machine.rx.Completable
generalizeAsync
(String groupName, String name) Generalizes the virtual machine asynchronously.com.microsoft.rest.ServiceFuture<Void>
generalizeAsync
(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback) Generalizes the virtual machine asynchronously.void
migrateToManaged
(String groupName, String name) Migrates the virtual machine with unmanaged disks to use managed disks.rx.Completable
migrateToManagedAsync
(String groupName, String name) Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.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.void
Powers off (stops) a virtual machine.rx.Completable
powerOffAsync
(String groupName, String name) Powers off (stops) the virtual machine asynchronously.com.microsoft.rest.ServiceFuture<Void>
powerOffAsync
(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback) Powers off (stop) the virtual machine asynchronously.void
Redeploys a virtual machine.rx.Completable
redeployAsync
(String groupName, String name) Redeploys the virtual machine asynchronously.com.microsoft.rest.ServiceFuture<Void>
redeployAsync
(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback) Redeploys the virtual machine asynchronously.void
Restarts a virtual machine.rx.Completable
restartAsync
(String groupName, String name) Restarts the virtual machine asynchronously.com.microsoft.rest.ServiceFuture<Void>
restartAsync
(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback) Restarts the virtual machine asynchronously.runCommand
(String groupName, String name, RunCommandInput inputCommand) Run commands in a virtual machine.rx.Observable<RunCommandResult>
runCommandAsync
(String groupName, String name, RunCommandInput inputCommand) Run commands in a virtual machine asynchronously.runPowerShellScript
(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters) Run shell script in a virtual machine.rx.Observable<RunCommandResult>
runPowerShellScriptAsync
(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters) Run shell script in a virtual machine asynchronously.runShellScript
(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters) Run shell script in a virtual machine.rx.Observable<RunCommandResult>
runShellScriptAsync
(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters) Run shell script in a virtual machine asynchronously.sizes()
void
Starts a virtual machine.rx.Completable
startAsync
(String groupName, String name) Starts the virtual machine asynchronously.com.microsoft.rest.ServiceFuture<Void>
startAsync
(String groupName, String name, com.microsoft.rest.ServiceCallback<Void> callback) Starts the virtual machine asynchronously.Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.HasInner
inner
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasManager
manager
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation
create, create, createAsync, createAsync, createAsync, createAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsBatchDeletion
deleteByIds, deleteByIds, deleteByIdsAsync, deleteByIdsAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating
define
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeletingById
deleteById, deleteByIdAsync, deleteByIdAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup
deleteByResourceGroup, deleteByResourceGroupAsync, deleteByResourceGroupAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById
getById, getByIdAsync, getByIdAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup
getByResourceGroup, getByResourceGroupAsync, getByResourceGroupAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing
list, listAsync
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByResourceGroup
listByResourceGroup, listByResourceGroupAsync
-
Method Details
-
sizes
VirtualMachineSizes sizes()- Returns:
- available virtual machine sizes
-
deallocate
Shuts down the virtual machine and releases the compute resources.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine name
-
deallocateAsync
Shuts down the virtual machine and releases the compute resources asynchronously.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- 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 inname
- the virtual machine namecallback
- the callback to call on success or failure- Returns:
- a handle to cancel the request
-
generalize
Generalizes the virtual machine.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine name
-
generalizeAsync
Generalizes the virtual machine asynchronously.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- 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 inname
- the virtual machine namecallback
- the callback to call on success or failure- Returns:
- a handle to cancel the request
-
powerOff
Powers off (stops) a virtual machine.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine name
-
powerOffAsync
Powers off (stops) the virtual machine asynchronously.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- 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 inname
- the virtual machine namecallback
- the callback to call on success or failure- Returns:
- a handle to cancel the request
-
restart
Restarts a virtual machine.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine name
-
restartAsync
Restarts the virtual machine asynchronously.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- 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 inname
- the virtual machine namecallback
- the callback to call on success or failure- Returns:
- a handle to cancel the request
-
start
Starts a virtual machine.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine name
-
startAsync
Starts the virtual machine asynchronously.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- 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 inname
- the virtual machine namecallback
- the callback to call on success or failure- Returns:
- a handle to cancel the request
-
redeploy
Redeploys a virtual machine.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine name
-
redeployAsync
Redeploys the virtual machine asynchronously.- Parameters:
groupName
- the name of the resource group the virtual machine is inname
- 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 inname
- the virtual machine namecallback
- 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 namename
- the virtual machine namecontainerName
- destination container name to store the captured VHDvhdPrefix
- the prefix for the VHD holding captured imageoverwriteVhd
- 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 namename
- the virtual machine namecontainerName
- destination container name to store the captured VHDvhdPrefix
- the prefix for the VHD holding captured imageoverwriteVhd
- 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 namename
- the virtual machine namecontainerName
- destination container name to store the captured VHDvhdPrefix
- the prefix for the VHD holding captured imageoverwriteVhd
- whether to overwrites destination VHD if it existscallback
- the callback to call on success or failure- Returns:
- a representation of the deferred computation of this call
-
migrateToManaged
Migrates the virtual machine with unmanaged disks to use managed disks.- Parameters:
groupName
- the resource group namename
- the virtual machine name
-
migrateToManagedAsync
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.- Parameters:
groupName
- the resource group namename
- 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 namename
- the virtual machine namecallback
- 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 namename
- the virtual machine namescriptLines
- PowerShell script linesscriptParameters
- 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 namename
- the virtual machine namescriptLines
- PowerShell script linesscriptParameters
- 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 namename
- the virtual machine namescriptLines
- shell script linesscriptParameters
- 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 namename
- the virtual machine namescriptLines
- shell script linesscriptParameters
- script parameters- Returns:
- handle to the asynchronous execution
-
runCommand
Run commands in a virtual machine.- Parameters:
groupName
- the resource group namename
- the virtual machine nameinputCommand
- 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 namename
- the virtual machine nameinputCommand
- command input- Returns:
- handle to the asynchronous execution
-
deleteById
Force delete a resource from Azure, identifying it by its resource ID.- Parameters:
id
- the resource ID of the resource to deleteforceDeletion
- 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 deleteforceDeletion
- force delete parametercallback
- the callback on success or failure- Returns:
- a handle to cancel the request
-
deleteByIdAsync
Asynchronously force delete a resource from Azure, identifying it by its resource ID.- Parameters:
id
- the resource ID of the resource to deleteforceDeletion
- force delete parameter- Returns:
- a representation of the deferred computation of this call
-
deleteByResourceGroup
Force delete a resource from Azure, identifying it by its name and its resource group.- Parameters:
resourceGroupName
- the resource group the resource is part ofname
- the name of the resourceforceDeletion
- 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 ofname
- the name of the resourceforceDeletion
- force delete parametercallback
- 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 ofname
- the name of the resourceforceDeletion
- force delete parameter- Returns:
- a representation of the deferred computation of this call
-