public interface VirtualMachines extends SupportsListing<VirtualMachine>, SupportsListingByResourceGroup<VirtualMachine>, SupportsGettingByResourceGroup<VirtualMachine>, SupportsGettingById<VirtualMachine>, SupportsCreating<VirtualMachine.DefinitionStages.Blank>, SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsBatchCreation<VirtualMachine>, SupportsBatchDeletion, HasManager<ComputeManager>
Modifier and Type | Method and Description |
---|---|
Accepted<Void> |
beginDeleteById(String id)
Begins deleting a virtual machine from Azure, identifying it by its resource ID.
|
Accepted<Void> |
beginDeleteByResourceGroup(String resourceGroupName,
String name)
Begins deleting a virtual machine from Azure, identifying it by its name and its resource group.
|
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.
|
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.
|
void |
deallocate(String groupName,
String name)
Shuts down the virtual machine and releases the compute resources.
|
Mono<Void> |
deallocateAsync(String groupName,
String name)
Shuts down the virtual machine and releases the compute resources asynchronously.
|
void |
generalize(String groupName,
String name)
Generalizes the virtual machine.
|
Mono<Void> |
generalizeAsync(String groupName,
String name)
Generalizes the virtual machine asynchronously.
|
void |
migrateToManaged(String groupName,
String name)
Migrates the virtual machine with unmanaged disks to use managed disks.
|
Mono<Void> |
migrateToManagedAsync(String groupName,
String name)
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
|
void |
powerOff(String groupName,
String name)
Powers off (stops) a virtual machine.
|
Mono<Void> |
powerOffAsync(String groupName,
String name)
Powers off (stops) the virtual machine asynchronously.
|
void |
redeploy(String groupName,
String name)
Redeploys a virtual machine.
|
Mono<Void> |
redeployAsync(String groupName,
String name)
Redeploys the virtual machine asynchronously.
|
void |
restart(String groupName,
String name)
Restarts a virtual machine.
|
Mono<Void> |
restartAsync(String groupName,
String name)
Restarts the virtual machine asynchronously.
|
RunCommandResult |
runCommand(String groupName,
String name,
RunCommandInput inputCommand)
Run commands in a virtual machine.
|
Mono<RunCommandResult> |
runCommandAsync(String groupName,
String name,
RunCommandInput inputCommand)
Run commands in a virtual machine asynchronously.
|
RunCommandResult |
runPowerShellScript(String groupName,
String name,
List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine.
|
Mono<RunCommandResult> |
runPowerShellScriptAsync(String groupName,
String name,
List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine asynchronously.
|
RunCommandResult |
runShellScript(String groupName,
String name,
List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine.
|
Mono<RunCommandResult> |
runShellScriptAsync(String groupName,
String name,
List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine asynchronously.
|
VirtualMachineSizes |
sizes() |
void |
start(String groupName,
String name)
Starts a virtual machine.
|
Mono<Void> |
startAsync(String groupName,
String name)
Starts the virtual machine asynchronously.
|
list, listAsync
listByResourceGroup, listByResourceGroupAsync
getByResourceGroup, getByResourceGroupAsync
getById, getByIdAsync
define
deleteById, deleteByIdAsync
deleteByResourceGroup, deleteByResourceGroupAsync
create, create, createAsync, createAsync
deleteByIds, deleteByIds, deleteByIdsAsync, deleteByIdsAsync
manager
VirtualMachineSizes sizes()
void deallocate(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameMono<Void> deallocateAsync(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine namevoid generalize(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameMono<Void> generalizeAsync(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine namevoid powerOff(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameMono<Void> powerOffAsync(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine namevoid restart(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameMono<Void> restartAsync(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine namevoid start(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameMono<Void> startAsync(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine namevoid redeploy(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameMono<Void> redeployAsync(String groupName, String name)
groupName
- the name of the resource group the virtual machine is inname
- the virtual machine nameString capture(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd)
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 existsMono<String> captureAsync(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd)
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 existsvoid migrateToManaged(String groupName, String name)
groupName
- the resource group namename
- the virtual machine nameMono<Void> migrateToManagedAsync(String groupName, String name)
groupName
- the resource group namename
- the virtual machine nameRunCommandResult runPowerShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
groupName
- the resource group namename
- the virtual machine namescriptLines
- PowerShell script linesscriptParameters
- script parametersMono<RunCommandResult> runPowerShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
groupName
- the resource group namename
- the virtual machine namescriptLines
- PowerShell script linesscriptParameters
- script parametersRunCommandResult runShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
groupName
- the resource group namename
- the virtual machine namescriptLines
- shell script linesscriptParameters
- script parametersMono<RunCommandResult> runShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
groupName
- the resource group namename
- the virtual machine namescriptLines
- shell script linesscriptParameters
- script parametersRunCommandResult runCommand(String groupName, String name, RunCommandInput inputCommand)
groupName
- the resource group namename
- the virtual machine nameinputCommand
- command inputMono<RunCommandResult> runCommandAsync(String groupName, String name, RunCommandInput inputCommand)
groupName
- the resource group namename
- the virtual machine nameinputCommand
- command inputAccepted<Void> beginDeleteById(String id)
id
- the resource ID of the virtual machine to deleteAccepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name)
resourceGroupName
- the resource group the resource is part ofname
- the virtual machine nameCopyright © 2020 Microsoft Corporation. All rights reserved.