public interface VirtualMachine extends GroupableResource<com.microsoft.azure.management.compute.implementation.ComputeManager,com.microsoft.azure.management.compute.implementation.VirtualMachineInner>, Refreshable<VirtualMachine>, Updatable<VirtualMachine.Update>, 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.
|
Resource.DefinitionWithRegion<T>, Resource.DefinitionWithTags<T>, Resource.UpdateWithTags<T>
Modifier and Type | Method and Description |
---|---|
String |
availabilitySetId() |
Set<AvailabilityZoneId> |
availabilityZones() |
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.
|
ServiceFuture<String> |
captureAsync(String containerName,
String vhdPrefix,
boolean overwriteVhd,
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.
|
ServiceFuture<Void> |
convertToManagedAsync(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.
|
ServiceFuture<Void> |
deallocateAsync(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.
|
ServiceFuture<Void> |
generalizeAsync(ServiceCallback<Void> callback)
Generalizes the virtual machine asynchronously.
|
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.
|
ServiceFuture<Void> |
powerOffAsync(ServiceCallback<Void> callback)
Powers off (stop) the virtual machine asynchronously.
|
PowerState |
powerState() |
String |
provisioningState() |
ProximityPlacementGroup |
proximityPlacementGroup()
Get specifies information about the proximity placement group that the virtual machine scale set should be
assigned to.
|
void |
redeploy()
Redeploys the virtual machine.
|
rx.Completable |
redeployAsync()
Redeploys the virtual machine asynchronously.
|
ServiceFuture<Void> |
redeployAsync(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.
|
ServiceFuture<Void> |
restartAsync(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.
|
ServiceFuture<Void> |
startAsync(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, type
key
id
name
resourceGroupName
manager
inner
refresh, refreshAsync
update
getPrimaryNetworkInterface, networkInterfaceIds, primaryNetworkInterfaceId
void deallocate()
rx.Completable deallocateAsync()
ServiceFuture<Void> deallocateAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failurevoid generalize()
rx.Completable generalizeAsync()
ServiceFuture<Void> generalizeAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failurevoid powerOff()
rx.Completable powerOffAsync()
ServiceFuture<Void> powerOffAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failurevoid restart()
rx.Completable restartAsync()
ServiceFuture<Void> restartAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failurevoid start()
rx.Completable startAsync()
ServiceFuture<Void> startAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failurevoid redeploy()
rx.Completable redeployAsync()
ServiceFuture<Void> redeployAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failureVirtualMachineEncryption diskEncryption()
void convertToManaged()
rx.Completable convertToManagedAsync()
ServiceFuture<Void> convertToManagedAsync(ServiceCallback<Void> callback)
callback
- the callback to call on success or failurePagedList<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 existsServiceFuture<String> captureAsync(String containerName, String vhdPrefix, boolean overwriteVhd, 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()
PublicIPAddress getPrimaryPublicIPAddress()
Note that this method makes a rest API call to fetch the resource.
String getPrimaryPublicIPAddressId()
String availabilitySetId()
String provisioningState()
String licenseType()
ProximityPlacementGroup proximityPlacementGroup()
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<AvailabilityZoneId> availabilityZones()
boolean isBootDiagnosticsEnabled()
String bootDiagnosticsStorageUri()
boolean isManagedServiceIdentityEnabled()
String systemAssignedManagedServiceIdentityTenantId()
String systemAssignedManagedServiceIdentityPrincipalId()
ResourceIdentityType managedServiceIdentityType()
Copyright © 2019. All rights reserved.