VirtualMachine Interface
Implements
public interface VirtualMachine
extends GroupableResource<ComputeManager,VirtualMachineInner>, Refreshable<VirtualMachine>, Updatable<Update>, HasNetworkInterfaces
An immutable client-side representation of an Azure virtual machine.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract String | availabilitySetId() |
abstract
Set<Availability |
availabilityZones() |
abstract
Paged |
availableSizes()
Lists all available virtual machine sizes this virtual machine can resized to. |
abstract
Billing |
billingProfile() |
abstract String | bootDiagnosticsStorageUri() |
abstract String |
capacityReservationGroupId()
Gets resource id of capacity reservation group for the virtual machine. |
abstract String |
capture(String containerName, String vhdPrefix, boolean overwriteVhd)
Captures the virtual machine by copying virtual hard disks of the VM. |
abstract Mono<String> |
captureAsync(String containerName, String vhdPrefix, boolean overwriteVhd)
Captures the virtual machine by copying virtual hard disks of the VM asynchronously. |
abstract String | computerName() |
abstract void |
convertToManaged()
Converts (migrates) the virtual machine with un-managed disks to use managed disk. |
abstract Mono<Void> |
convertToManagedAsync()
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously. |
abstract
Map<Integer,Virtual |
dataDisks() |
abstract void |
deallocate()
Shuts down the virtual machine and releases the compute resources. |
abstract void |
deallocate(boolean hibernate)
Shuts down the virtual machine and releases the compute resources. |
abstract Mono<Void> |
deallocateAsync()
Shuts down the virtual machine and releases the compute resources asynchronously. |
abstract Mono<Void> |
deallocateAsync(boolean hibernate)
Shuts down the virtual machine and releases the compute resources asynchronously. |
abstract
Diagnostics |
diagnosticsProfile() |
abstract
Virtual |
diskEncryption() |
abstract
Virtual |
evictionPolicy() |
abstract void |
generalize()
Generalizes the virtual machine. |
abstract Mono<Void> |
generalizeAsync()
Generalizes the virtual machine asynchronously. |
abstract
Public |
getPrimaryPublicIPAddress()
Gets the public IP address associated with this virtual machine's primary network interface. |
abstract String | getPrimaryPublicIPAddressId() |
abstract
Virtual |
instanceView()
Get the virtual machine instance view. |
abstract boolean | isBootDiagnosticsEnabled() |
abstract boolean | isEncryptionAtHost() |
abstract boolean | isHibernationEnabled() |
abstract boolean | isManagedDiskEnabled() |
abstract boolean | isManagedServiceIdentityEnabled() |
abstract boolean | isOSDiskEphemeral() |
abstract boolean |
isOsDiskWriteAcceleratorEnabled()
Gets whether the write accelerator is enabled. |
abstract boolean | isSecureBootEnabled() |
abstract boolean |
isUltraSsdEnabled()
Whether ultra SSD feature is enabled. |
abstract boolean | isVTpmEnabled() |
abstract String | licenseType() |
abstract
Map<String,Virtual |
listExtensions() |
abstract
Mono<List<Virtual |
listExtensionsAsync() |
abstract
Resource |
managedServiceIdentityType() |
abstract
Delete |
networkInterfaceDeleteOptions(String networkInterfaceId)
Gets the delete options for the given network interface. |
abstract
Caching |
osDiskCachingType() |
abstract
Delete |
osDiskDeleteOptions() |
abstract String | osDiskDiskEncryptionSetId() |
abstract String | osDiskId() |
abstract int | osDiskSize() |
abstract
Storage |
osDiskStorageAccountType() |
abstract OSProfile | osProfile() |
abstract
Operating |
osType() |
abstract String | osUnmanagedDiskVhdUri() |
abstract Plan | plan() |
abstract void |
powerOff()
Powers off (stops) the virtual machine. |
abstract void |
powerOff(boolean skipShutdown)
Stops the virtual machine. |
abstract Mono<Void> |
powerOffAsync()
Powers off (stops) the virtual machine asynchronously. |
abstract Mono<Void> |
powerOffAsync(boolean skipShutdown)
Stops the virtual machine. |
abstract
Power |
powerState() |
abstract
Delete |
primaryNetworkInterfaceDeleteOptions()
Gets the delete options for the primary network interface. |
abstract
Virtual |
priority() |
abstract String | provisioningState() |
abstract
Proximity |
proximityPlacementGroup()
Get specifies information about the proximity placement group that the virtual machine scale set should be assigned to. |
abstract void |
redeploy()
Redeploys the virtual machine. |
abstract Mono<Void> |
redeployAsync()
Redeploys the virtual machine asynchronously. |
abstract
Virtual |
refreshInstanceView()
Refreshes the virtual machine instance view to sync with Azure. |
abstract
Mono<Virtual |
refreshInstanceViewAsync()
Refreshes the virtual machine instance view to sync with Azure. |
abstract void |
restart()
Restarts the virtual machine. |
abstract Mono<Void> |
restartAsync()
Restarts the virtual machine asynchronously. |
abstract
Run |
runCommand(RunCommandInput inputCommand)
Run commands in the virtual machine. |
abstract
Mono<Run |
runCommandAsync(RunCommandInput inputCommand)
Run commands in the virtual machine asynchronously. |
abstract
Run |
runPowerShellScript(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine. |
abstract
Mono<Run |
runPowerShellScriptAsync(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine asynchronously. |
abstract
Run |
runShellScript(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine. |
abstract
Mono<Run |
runShellScriptAsync(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine asynchronously. |
abstract
Security |
securityType() |
abstract void |
simulateEviction()
Simulates the eviction of spot virtual machine. |
abstract Mono<Void> |
simulateEvictionAsync()
Simulates the eviction of spot virtual machine asynchronously. |
abstract
Virtual |
size() |
abstract void |
start()
Starts the virtual machine. |
abstract Mono<Void> |
startAsync()
Starts the virtual machine asynchronously. |
abstract
Storage |
storageProfile()
Returns the storage profile of an Azure virtual machine. |
abstract String | systemAssignedManagedServiceIdentityPrincipalId() |
abstract String | systemAssignedManagedServiceIdentityTenantId() |
abstract
Offset |
timeCreated() |
abstract
Map<Integer,Virtual |
unmanagedDataDisks() |
abstract Set<String> | userAssignedManagedServiceIdentityIds() |
abstract String |
userData()
Gets the base64 encoded user data for the virtual machine. |
abstract String | virtualMachineScaleSetId() |
abstract String | vmId() |
Method Details
availabilitySetId
public abstract String availabilitySetId()
Returns:
availabilityZones
public abstract Set
Returns:
availableSizes
public abstract PagedIterable
Lists all available virtual machine sizes this virtual machine can resized to.
Returns:
billingProfile
public abstract BillingProfile billingProfile()
Returns:
bootDiagnosticsStorageUri
public abstract String bootDiagnosticsStorageUri()
Returns:
capacityReservationGroupId
public abstract String capacityReservationGroupId()
Gets resource id of capacity reservation group for the virtual machine.
Returns:
capture
public abstract String capture(String containerName, String vhdPrefix, boolean overwriteVhd)
Captures the virtual machine by copying virtual hard disks of the VM.
Parameters:
Returns:
captureAsync
public abstract Mono
Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
Parameters:
Returns:
computerName
public abstract String computerName()
Returns:
convertToManaged
public abstract void convertToManaged()
Converts (migrates) the virtual machine with un-managed disks to use managed disk.
convertToManagedAsync
public abstract Mono
Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
Returns:
dataDisks
public abstract Map
Returns:
deallocate
public abstract void deallocate()
Shuts down the virtual machine and releases the compute resources.
deallocate
public abstract void deallocate(boolean hibernate)
Shuts down the virtual machine and releases the compute resources.
Parameters:
deallocateAsync
public abstract Mono
Shuts down the virtual machine and releases the compute resources asynchronously.
Returns:
deallocateAsync
public abstract Mono
Shuts down the virtual machine and releases the compute resources asynchronously.
Parameters:
Returns:
diagnosticsProfile
public abstract DiagnosticsProfile diagnosticsProfile()
Returns:
diskEncryption
public abstract VirtualMachineEncryption diskEncryption()
Returns:
evictionPolicy
public abstract VirtualMachineEvictionPolicyTypes evictionPolicy()
Returns:
generalize
public abstract void generalize()
Generalizes the virtual machine.
generalizeAsync
public abstract Mono
Generalizes the virtual machine asynchronously.
Returns:
getPrimaryPublicIPAddress
public abstract PublicIpAddress getPrimaryPublicIPAddress()
Gets the public IP address associated with this virtual machine's primary network interface.
Note that this method makes a rest API call to fetch the resource.
Returns:
getPrimaryPublicIPAddressId
public abstract String getPrimaryPublicIPAddressId()
Returns:
instanceView
public abstract VirtualMachineInstanceView instanceView()
Get the virtual machine instance view.
The instance view will be cached for later retrieval using instanceView
.
Returns:
isBootDiagnosticsEnabled
public abstract boolean isBootDiagnosticsEnabled()
Returns:
isEncryptionAtHost
public abstract boolean isEncryptionAtHost()
Returns:
isHibernationEnabled
public abstract boolean isHibernationEnabled()
Returns:
isManagedDiskEnabled
public abstract boolean isManagedDiskEnabled()
Returns:
isManagedServiceIdentityEnabled
public abstract boolean isManagedServiceIdentityEnabled()
Returns:
isOSDiskEphemeral
public abstract boolean isOSDiskEphemeral()
Returns:
isOsDiskWriteAcceleratorEnabled
public abstract boolean isOsDiskWriteAcceleratorEnabled()
Gets whether the write accelerator is enabled.
Returns:
isSecureBootEnabled
public abstract boolean isSecureBootEnabled()
Returns:
isUltraSsdEnabled
public abstract boolean isUltraSsdEnabled()
Whether ultra SSD feature is enabled.
Returns:
isVTpmEnabled
public abstract boolean isVTpmEnabled()
Returns:
licenseType
public abstract String licenseType()
Returns:
listExtensions
public abstract Map
Returns:
listExtensionsAsync
public abstract Mono> listExtensionsAsync()
Returns:
managedServiceIdentityType
public abstract ResourceIdentityType managedServiceIdentityType()
Returns:
networkInterfaceDeleteOptions
public abstract DeleteOptions networkInterfaceDeleteOptions(String networkInterfaceId)
Gets the delete options for the given network interface.
Parameters:
Returns:
osDiskCachingType
public abstract CachingTypes osDiskCachingType()
Returns:
osDiskDeleteOptions
public abstract DeleteOptions osDiskDeleteOptions()
Returns:
osDiskDiskEncryptionSetId
public abstract String osDiskDiskEncryptionSetId()
Returns:
osDiskId
public abstract String osDiskId()
Returns:
osDiskSize
public abstract int osDiskSize()
Returns:
osDiskStorageAccountType
public abstract StorageAccountTypes osDiskStorageAccountType()
Returns:
osProfile
public abstract OSProfile osProfile()
Returns:
osType
public abstract OperatingSystemTypes osType()
Returns:
osUnmanagedDiskVhdUri
public abstract String osUnmanagedDiskVhdUri()
Returns:
plan
public abstract Plan plan()
Returns:
powerOff
public abstract void powerOff()
Powers off (stops) the virtual machine.
powerOff
public abstract void powerOff(boolean skipShutdown)
Stops the virtual machine.
Parameters:
powerOffAsync
public abstract Mono
Powers off (stops) the virtual machine asynchronously.
Returns:
powerOffAsync
public abstract Mono
Stops the virtual machine.
Parameters:
Returns:
powerState
public abstract PowerState powerState()
Returns:
primaryNetworkInterfaceDeleteOptions
public abstract DeleteOptions primaryNetworkInterfaceDeleteOptions()
Gets the delete options for the primary network interface.
Returns:
priority
public abstract VirtualMachinePriorityTypes priority()
Returns:
provisioningState
public abstract String provisioningState()
Returns:
proximityPlacementGroup
public abstract ProximityPlacementGroup proximityPlacementGroup()
Get specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
Returns:
redeploy
public abstract void redeploy()
Redeploys the virtual machine.
redeployAsync
public abstract Mono
Redeploys the virtual machine asynchronously.
Returns:
refreshInstanceView
public abstract VirtualMachineInstanceView refreshInstanceView()
Refreshes the virtual machine instance view to sync with Azure.
The instance view will be cached for later retrieval using instanceView
.
Returns:
refreshInstanceViewAsync
public abstract Mono
Refreshes the virtual machine instance view to sync with Azure.
Returns:
restart
public abstract void restart()
Restarts the virtual machine.
restartAsync
public abstract Mono
Restarts the virtual machine asynchronously.
Returns:
runCommand
public abstract RunCommandResult runCommand(RunCommandInput inputCommand)
Run commands in the virtual machine.
Parameters:
Returns:
runCommandAsync
public abstract Mono
Run commands in the virtual machine asynchronously.
Parameters:
Returns:
runPowerShellScript
public abstract RunCommandResult runPowerShellScript(List
Run shell script in a virtual machine.
Parameters:
Returns:
runPowerShellScriptAsync
public abstract Mono
Run shell script in the virtual machine asynchronously.
Parameters:
Returns:
runShellScript
public abstract RunCommandResult runShellScript(List
Run shell script in the virtual machine.
Parameters:
Returns:
runShellScriptAsync
public abstract Mono
Run shell script in the virtual machine asynchronously.
Parameters:
Returns:
securityType
simulateEviction
public abstract void simulateEviction()
Simulates the eviction of spot virtual machine. The eviction will occur with 30 minutes after calling this API.
simulateEvictionAsync
public abstract Mono
Simulates the eviction of spot virtual machine asynchronously. The eviction will occur with 30 minutes after calling this API.
Returns:
size
public abstract VirtualMachineSizeTypes size()
Returns:
start
public abstract void start()
Starts the virtual machine.
startAsync
public abstract Mono
Starts the virtual machine asynchronously.
Returns:
storageProfile
public abstract StorageProfile storageProfile()
Returns the storage profile of an Azure virtual machine.
Returns:
systemAssignedManagedServiceIdentityPrincipalId
public abstract String systemAssignedManagedServiceIdentityPrincipalId()
Returns:
systemAssignedManagedServiceIdentityTenantId
public abstract String systemAssignedManagedServiceIdentityTenantId()
Returns:
timeCreated
public abstract OffsetDateTime timeCreated()
Returns:
unmanagedDataDisks
public abstract Map
Returns:
userAssignedManagedServiceIdentityIds
public abstract Set
Returns:
userData
public abstract String userData()
Gets the base64 encoded user data for the virtual machine.
Returns:
virtualMachineScaleSetId
public abstract String virtualMachineScaleSetId()
Returns:
vmId
public abstract String vmId()
Returns:
Applies to
Azure SDK for Java