public interface VirtualMachine extends com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource<com.microsoft.azure.management.compute.implementation.ComputeManager,com.microsoft.azure.management.compute.implementation.VirtualMachineInner>, com.microsoft.azure.management.resources.fluentcore.model.Refreshable<VirtualMachine>, com.microsoft.azure.management.resources.fluentcore.model.Updatable<VirtualMachine.Update>, com.microsoft.azure.management.network.model.HasNetworkInterfaces
| Modifier and Type | Interface and Description |
|---|---|
static interface |
VirtualMachine.DefinitionManaged
The entirety of the managed disk based virtual machine definition.
|
static interface |
VirtualMachine.DefinitionManagedOrUnmanaged
The entirety of the virtual machine definition.
|
static interface |
VirtualMachine.DefinitionShared
The virtual machine scale set stages shared between managed and unmanaged based
virtual machine definitions.
|
static interface |
VirtualMachine.DefinitionStages
Grouping of virtual machine definition stages.
|
static interface |
VirtualMachine.DefinitionUnmanaged
The entirety of the unmanaged disk based virtual machine definition.
|
static interface |
VirtualMachine.Update
The template for an update operation, containing all the settings that can be modified.
|
static interface |
VirtualMachine.UpdateStages
Grouping of virtual machine update stages.
|
com.microsoft.azure.management.resources.fluentcore.arm.models.Resource.DefinitionWithRegion<T>, com.microsoft.azure.management.resources.fluentcore.arm.models.Resource.DefinitionWithTags<T>, com.microsoft.azure.management.resources.fluentcore.arm.models.Resource.UpdateWithTags<T>| Modifier and Type | Method and Description |
|---|---|
String |
availabilitySetId() |
Set<com.microsoft.azure.management.resources.fluentcore.arm.AvailabilityZoneId> |
availabilityZones() |
com.microsoft.azure.PagedList<VirtualMachineSize> |
availableSizes()
Lists all available virtual machine sizes this virtual machine can resized to.
|
String |
bootDiagnosticsStorageUri() |
String |
capture(String containerName,
String vhdPrefix,
boolean overwriteVhd)
Captures the virtual machine by copying virtual hard disks of the VM.
|
rx.Observable<String> |
captureAsync(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 containerName,
String vhdPrefix,
boolean overwriteVhd,
com.microsoft.rest.ServiceCallback<String> callback)
Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
|
String |
computerName() |
void |
convertToManaged()
Converts (migrates) the virtual machine with un-managed disks to use managed disk.
|
rx.Completable |
convertToManagedAsync()
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
convertToManagedAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
|
Map<Integer,VirtualMachineDataDisk> |
dataDisks() |
void |
deallocate()
Shuts down the virtual machine and releases the compute resources.
|
rx.Completable |
deallocateAsync()
Shuts down the virtual machine and releases the compute resources asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
deallocateAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Shuts down the virtual machine and releases the compute resources asynchronously.
|
DiagnosticsProfile |
diagnosticsProfile() |
VirtualMachineEncryption |
diskEncryption() |
void |
generalize()
Generalizes the virtual machine.
|
rx.Completable |
generalizeAsync()
Generalizes the virtual machine asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
generalizeAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Generalizes the virtual machine asynchronously.
|
com.microsoft.azure.management.network.PublicIPAddress |
getPrimaryPublicIPAddress()
Gets the public IP address associated with this virtual machine's primary network interface.
|
String |
getPrimaryPublicIPAddressId() |
VirtualMachineInstanceView |
instanceView()
Get the virtual machine instance view.
|
boolean |
isBootDiagnosticsEnabled() |
boolean |
isManagedDiskEnabled() |
boolean |
isManagedServiceIdentityEnabled() |
String |
licenseType() |
Map<String,VirtualMachineExtension> |
listExtensions() |
rx.Observable<VirtualMachineExtension> |
listExtensionsAsync() |
ResourceIdentityType |
managedServiceIdentityType() |
CachingTypes |
osDiskCachingType() |
String |
osDiskId() |
int |
osDiskSize() |
StorageAccountTypes |
osDiskStorageAccountType() |
OSProfile |
osProfile() |
OperatingSystemTypes |
osType() |
String |
osUnmanagedDiskVhdUri() |
Plan |
plan() |
void |
powerOff()
Powers off (stops) the virtual machine.
|
rx.Completable |
powerOffAsync()
Powers off (stops) the virtual machine asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
powerOffAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Powers off (stop) the virtual machine asynchronously.
|
PowerState |
powerState() |
String |
provisioningState() |
void |
redeploy()
Redeploys the virtual machine.
|
rx.Completable |
redeployAsync()
Redeploys the virtual machine asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
redeployAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Redeploys the virtual machine asynchronously.
|
VirtualMachineInstanceView |
refreshInstanceView()
Refreshes the virtual machine instance view to sync with Azure.
|
rx.Observable<VirtualMachineInstanceView> |
refreshInstanceViewAsync()
Refreshes the virtual machine instance view to sync with Azure.
|
void |
restart()
Restarts the virtual machine.
|
rx.Completable |
restartAsync()
Restarts the virtual machine asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
restartAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Restarts the virtual machine asynchronously.
|
RunCommandResult |
runCommand(RunCommandInput inputCommand)
Run commands in the virtual machine.
|
rx.Observable<RunCommandResult> |
runCommandAsync(RunCommandInput inputCommand)
Run commands in the virtual machine asynchronously.
|
RunCommandResult |
runPowerShellScript(String groupName,
String name,
List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine.
|
rx.Observable<RunCommandResult> |
runPowerShellScriptAsync(List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine asynchronously.
|
RunCommandResult |
runShellScript(List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine.
|
rx.Observable<RunCommandResult> |
runShellScriptAsync(List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine asynchronously.
|
VirtualMachineSizeTypes |
size() |
void |
start()
Starts the virtual machine.
|
rx.Completable |
startAsync()
Starts the virtual machine asynchronously.
|
com.microsoft.rest.ServiceFuture<Void> |
startAsync(com.microsoft.rest.ServiceCallback<Void> callback)
Starts the virtual machine asynchronously.
|
StorageProfile |
storageProfile()
Returns the storage profile of an Azure virtual machine.
|
String |
systemAssignedManagedServiceIdentityPrincipalId() |
String |
systemAssignedManagedServiceIdentityTenantId() |
Map<Integer,VirtualMachineUnmanagedDataDisk> |
unmanagedDataDisks() |
Set<String> |
userAssignedManagedServiceIdentityIds() |
String |
vmId() |
region, regionName, tags, typekeyidnameresourceGroupNamemanagerinnerrefresh, refreshAsyncvoid deallocate()
rx.Completable deallocateAsync()
com.microsoft.rest.ServiceFuture<Void> deallocateAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failurevoid generalize()
rx.Completable generalizeAsync()
com.microsoft.rest.ServiceFuture<Void> generalizeAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failurevoid powerOff()
rx.Completable powerOffAsync()
com.microsoft.rest.ServiceFuture<Void> powerOffAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failurevoid restart()
rx.Completable restartAsync()
com.microsoft.rest.ServiceFuture<Void> restartAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failurevoid start()
rx.Completable startAsync()
com.microsoft.rest.ServiceFuture<Void> startAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failurevoid redeploy()
rx.Completable redeployAsync()
com.microsoft.rest.ServiceFuture<Void> redeployAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failureVirtualMachineEncryption diskEncryption()
void convertToManaged()
rx.Completable convertToManagedAsync()
com.microsoft.rest.ServiceFuture<Void> convertToManagedAsync(com.microsoft.rest.ServiceCallback<Void> callback)
callback - the callback to call on success or failurecom.microsoft.azure.PagedList<VirtualMachineSize> availableSizes()
String capture(String containerName, String vhdPrefix, boolean overwriteVhd)
containerName - destination container name to store the captured VHDvhdPrefix - the prefix for the VHD holding captured imageoverwriteVhd - whether to overwrites destination VHD if it existsrx.Observable<String> captureAsync(String containerName, String vhdPrefix, boolean overwriteVhd)
containerName - destination container name to store the captured VHDvhdPrefix - the prefix for the VHD holding captured imageoverwriteVhd - whether to overwrites destination VHD if it existscom.microsoft.rest.ServiceFuture<String> captureAsync(String containerName, String vhdPrefix, boolean overwriteVhd, com.microsoft.rest.ServiceCallback<String> callback)
containerName - 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 failureVirtualMachineInstanceView refreshInstanceView()
The instance view will be cached for later retrieval using instanceView.
rx.Observable<VirtualMachineInstanceView> refreshInstanceViewAsync()
RunCommandResult runPowerShellScript(String groupName, String name, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
groupName - the resource group namename - the virtual machine namescriptLines - PowerShell script linesscriptParameters - script parametersrx.Observable<RunCommandResult> runPowerShellScriptAsync(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
scriptLines - PowerShell script linesscriptParameters - script parametersRunCommandResult runShellScript(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
scriptLines - shell script linesscriptParameters - script parametersrx.Observable<RunCommandResult> runShellScriptAsync(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
scriptLines - shell script linesscriptParameters - script parametersRunCommandResult runCommand(RunCommandInput inputCommand)
inputCommand - command inputrx.Observable<RunCommandResult> runCommandAsync(RunCommandInput inputCommand)
inputCommand - command inputboolean isManagedDiskEnabled()
String computerName()
VirtualMachineSizeTypes size()
OperatingSystemTypes osType()
String osUnmanagedDiskVhdUri()
CachingTypes osDiskCachingType()
int osDiskSize()
StorageAccountTypes osDiskStorageAccountType()
String osDiskId()
Map<Integer,VirtualMachineUnmanagedDataDisk> unmanagedDataDisks()
Map<Integer,VirtualMachineDataDisk> dataDisks()
com.microsoft.azure.management.network.PublicIPAddress getPrimaryPublicIPAddress()
Note that this method makes a rest API call to fetch the resource.
String getPrimaryPublicIPAddressId()
String availabilitySetId()
String provisioningState()
String licenseType()
rx.Observable<VirtualMachineExtension> listExtensionsAsync()
Map<String,VirtualMachineExtension> listExtensions()
Plan plan()
StorageProfile storageProfile()
OSProfile osProfile()
DiagnosticsProfile diagnosticsProfile()
String vmId()
PowerState powerState()
VirtualMachineInstanceView instanceView()
The instance view will be cached for later retrieval using instanceView.
@Beta(value=V1_3_0) Set<com.microsoft.azure.management.resources.fluentcore.arm.AvailabilityZoneId> availabilityZones()
boolean isBootDiagnosticsEnabled()
String bootDiagnosticsStorageUri()
boolean isManagedServiceIdentityEnabled()
String systemAssignedManagedServiceIdentityTenantId()
String systemAssignedManagedServiceIdentityPrincipalId()
ResourceIdentityType managedServiceIdentityType()
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/