Interface VirtualMachines
- All Superinterfaces:
com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager<ComputeManager>, com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion, com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating<VirtualMachine.DefinitionStages.Blank>, com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup<VirtualMachine>
public interface VirtualMachines
extends com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating<VirtualMachine.DefinitionStages.Blank>, com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup, com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation<VirtualMachine>, com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion, com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager<ComputeManager>
Entry point to virtual machine management API.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> Begins deleting a virtual machine from Azure, identifying it by its resource ID.com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteById(String id, boolean forceDeletion) Begins force deleting a virtual machine from Azure, identifying it by its resource ID.default com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteById(String id, boolean forceDeletion, com.azure.core.util.Context context) Begins force deleting a virtual machine from Azure, identifying it by its resource ID.com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name) Begins deleting a virtual machine from Azure, identifying it by its name and its resource group.com.azure.resourcemanager.resources.fluentcore.model.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.default com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion, com.azure.core.util.Context context) Begins force deleting a virtual machine from Azure, identifying it by its name and its resource group.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.captureAsync(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd) Captures the virtual machine by copying virtual hard disks of the VM asynchronously.voiddeallocate(String groupName, String name) Shuts down the virtual machine and releases the compute resources.voiddeallocate(String groupName, String name, boolean hibernate) Shuts down the virtual machine and releases the compute resources.deallocateAsync(String groupName, String name) Shuts down the virtual machine and releases the compute resources asynchronously.deallocateAsync(String groupName, String name, boolean hibernate) Shuts down the virtual machine and releases the compute resources asynchronously.voiddeleteById(String id, boolean forceDeletion) Force delete a resource from Azure, identifying it by its resource ID.deleteByIdAsync(String id, boolean forceDeletion) Asynchronously force delete a resource from Azure, identifying it by its resource ID.voiddeleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion) Force delete a resource from Azure, identifying it by its name and its resource group.deleteByResourceGroupAsync(String resourceGroupName, String name, boolean forceDeletion) Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.voidgeneralize(String groupName, String name) Generalizes the virtual machine.generalizeAsync(String groupName, String name) Generalizes the virtual machine asynchronously.com.azure.core.http.rest.PagedIterable<VirtualMachine> Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.com.azure.core.http.rest.PagedFlux<VirtualMachine> Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.com.azure.core.http.rest.PagedIterable<VirtualMachine> listByVirtualMachineScaleSetId(String vmssId) Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.com.azure.core.http.rest.PagedFlux<VirtualMachine> Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.voidmigrateToManaged(String groupName, String name) Migrates the virtual machine with unmanaged disks to use managed disks.migrateToManagedAsync(String groupName, String name) Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.voidPowers off (stops) a virtual machine.powerOffAsync(String groupName, String name) Powers off (stops) the virtual machine asynchronously.voidRedeploys a virtual machine.redeployAsync(String groupName, String name) Redeploys the virtual machine asynchronously.voidRestarts a virtual machine.restartAsync(String groupName, String name) Restarts the virtual machine asynchronously.runCommand(String groupName, String name, RunCommandInput inputCommand) Run commands in a virtual machine.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.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.runShellScriptAsync(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters) Run shell script in a virtual machine asynchronously.sizes()Gets available virtual machine sizes.voidStarts a virtual machine.startAsync(String groupName, String name) Starts the virtual machine asynchronously.Methods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.models.HasManager
managerMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.collection.SupportsBatchCreation
create, create, createAsync, createAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsBatchDeletion
deleteByIds, deleteByIds, deleteByIdsAsync, deleteByIdsAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.collection.SupportsCreating
defineMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.collection.SupportsDeletingById
deleteById, deleteByIdAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup
deleteByResourceGroup, deleteByResourceGroupAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingById
getById, getByIdAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup
getByResourceGroup, getByResourceGroupAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.collection.SupportsListing
list, listAsyncMethods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.collection.SupportsListingByResourceGroup
listByResourceGroup, listByResourceGroupAsync
-
Method Details
-
sizes
VirtualMachineSizes sizes()Gets available virtual machine sizes.- Returns:
- available virtual machine sizes
-
deallocate
-
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
-
deallocate
-
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 namehibernate- hibernate the virtual machine- Returns:
- a representation of the deferred computation of this call
-
generalize
-
generalizeAsync
-
powerOff
-
powerOffAsync
-
restart
-
restartAsync
-
start
-
startAsync
-
redeploy
-
redeployAsync
-
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
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.- 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
-
migrateToManaged
-
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
-
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
Mono<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
Mono<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
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
-
beginDeleteById
-
beginDeleteByResourceGroup
com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name) Begins deleting a virtual machine from Azure, identifying it by its name and its resource group.- Parameters:
resourceGroupName- the resource group the resource is part ofname- the virtual machine name- Returns:
- the accepted deleting operation
-
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 without graceful shutdown
-
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 without graceful shutdown- 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 without graceful shutdown
-
deleteByResourceGroupAsync
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 without graceful shutdown- Returns:
- a representation of the deferred computation of this call
-
beginDeleteById
com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteById(String id, boolean forceDeletion) Begins force deleting a virtual machine from Azure, identifying it by its resource ID.- Parameters:
id- the resource ID of the virtual machine to deleteforceDeletion- force delete without graceful shutdown- Returns:
- the accepted deleting operation
-
beginDeleteById
default com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteById(String id, boolean forceDeletion, com.azure.core.util.Context context) Begins force deleting a virtual machine from Azure, identifying it by its resource ID.- Parameters:
id- the resource ID of the virtual machine to deleteforceDeletion- force delete without graceful shutdowncontext- theContextof the request- Returns:
- the accepted deleting operation
-
beginDeleteByResourceGroup
com.azure.resourcemanager.resources.fluentcore.model.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.- Parameters:
resourceGroupName- the resource group the resource is part ofname- the virtual machine nameforceDeletion- force delete without graceful shutdown- Returns:
- the accepted deleting operation
-
beginDeleteByResourceGroup
default com.azure.resourcemanager.resources.fluentcore.model.Accepted<Void> beginDeleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion, com.azure.core.util.Context context) Begins force deleting a virtual machine from Azure, identifying it by its name and its resource group.- Parameters:
resourceGroupName- the resource group the resource is part ofname- the virtual machine nameforceDeletion- force delete without graceful shutdowncontext- theContextof the request- Returns:
- the accepted deleting operation
-
listByVirtualMachineScaleSetId
com.azure.core.http.rest.PagedIterable<VirtualMachine> listByVirtualMachineScaleSetId(String vmssId) Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.Note: This method is for
OrchestrationMode.FLEXIBLEvirtual machine scale set. ForOrchestrationMode.UNIFORMscale sets, useVirtualMachineScaleSet.virtualMachines().- Parameters:
vmssId- resource ID of the virtual machine scale set- Returns:
- A
PagedIterableof virtual machines - See Also:
-
listByVirtualMachineScaleSetIdAsync
com.azure.core.http.rest.PagedFlux<VirtualMachine> listByVirtualMachineScaleSetIdAsync(String vmssId) Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.Note: This method is for
OrchestrationMode.FLEXIBLEvirtual machine scale set. ForOrchestrationMode.UNIFORMscale sets, useVirtualMachineScaleSet.virtualMachines().- Parameters:
vmssId- resource ID of the virtual machine scale set- Returns:
- A
PagedFluxof virtual machines - See Also:
-
listByVirtualMachineScaleSet
com.azure.core.http.rest.PagedIterable<VirtualMachine> listByVirtualMachineScaleSet(VirtualMachineScaleSet vmss) Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.Note: This method is for
OrchestrationMode.FLEXIBLEvirtual machine scale set. ForOrchestrationMode.UNIFORMscale sets, useVirtualMachineScaleSet.virtualMachines().- Parameters:
vmss- virtual machine scale set- Returns:
- A
PagedIterableof virtual machines - See Also:
-
listByVirtualMachineScaleSetAsync
com.azure.core.http.rest.PagedFlux<VirtualMachine> listByVirtualMachineScaleSetAsync(VirtualMachineScaleSet vmss) Lists all the virtual machines by a certain virtual machine scale set with orchestration modeOrchestrationMode.FLEXIBLE.Note: This method is for
OrchestrationMode.FLEXIBLEvirtual machine scale set. ForOrchestrationMode.UNIFORMscale sets, useVirtualMachineScaleSet.virtualMachines().- Parameters:
vmss- virtual machine scale set- Returns:
- A
PagedFluxof virtual machines - See Also:
-