public interface VirtualMachine extends GroupableResource<ComputeManager,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() |
com.azure.core.http.rest.PagedIterable<VirtualMachineSize> |
availableSizes()
Lists all available virtual machine sizes this virtual machine can resized to.
|
BillingProfile |
billingProfile() |
String |
bootDiagnosticsStorageUri() |
String |
capture(String containerName,
String vhdPrefix,
boolean overwriteVhd)
Captures the virtual machine by copying virtual hard disks of the VM.
|
Mono<String> |
captureAsync(String containerName,
String vhdPrefix,
boolean overwriteVhd)
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.
|
Mono<Void> |
convertToManagedAsync()
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.
|
Mono<Void> |
deallocateAsync()
Shuts down the virtual machine and releases the compute resources asynchronously.
|
DiagnosticsProfile |
diagnosticsProfile() |
VirtualMachineEncryption |
diskEncryption() |
VirtualMachineEvictionPolicyTypes |
evictionPolicy() |
void |
generalize()
Generalizes the virtual machine.
|
Mono<Void> |
generalizeAsync()
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() |
Mono<List<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.
|
Mono<Void> |
powerOffAsync()
Powers off (stops) the virtual machine asynchronously.
|
PowerState |
powerState() |
VirtualMachinePriorityTypes |
priority() |
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.
|
Mono<Void> |
redeployAsync()
Redeploys the virtual machine asynchronously.
|
VirtualMachineInstanceView |
refreshInstanceView()
Refreshes the virtual machine instance view to sync with Azure.
|
Mono<VirtualMachineInstanceView> |
refreshInstanceViewAsync()
Refreshes the virtual machine instance view to sync with Azure.
|
void |
restart()
Restarts the virtual machine.
|
Mono<Void> |
restartAsync()
Restarts the virtual machine asynchronously.
|
RunCommandResult |
runCommand(RunCommandInput inputCommand)
Run commands in the virtual machine.
|
Mono<RunCommandResult> |
runCommandAsync(RunCommandInput inputCommand)
Run commands in the virtual machine asynchronously.
|
RunCommandResult |
runPowerShellScript(List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in a virtual machine.
|
Mono<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.
|
Mono<RunCommandResult> |
runShellScriptAsync(List<String> scriptLines,
List<RunCommandInputParameter> scriptParameters)
Run shell script in the virtual machine asynchronously.
|
void |
simulateEviction()
Simulates the eviction of spot virtual machine.
|
Mono<Void> |
simulateEvictionAsync()
Simulates the eviction of spot virtual machine asynchronously.
|
VirtualMachineSizeTypes |
size() |
void |
start()
Starts the virtual machine.
|
Mono<Void> |
startAsync()
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
name
resourceGroupName
manager
innerModel
refresh, refreshAsync
update
getPrimaryNetworkInterface, networkInterfaceIds, primaryNetworkInterfaceId
void deallocate()
Mono<Void> deallocateAsync()
void generalize()
Mono<Void> generalizeAsync()
void powerOff()
Mono<Void> powerOffAsync()
void restart()
Mono<Void> restartAsync()
void start()
Mono<Void> startAsync()
void redeploy()
Mono<Void> redeployAsync()
void simulateEviction()
Mono<Void> simulateEvictionAsync()
VirtualMachineEncryption diskEncryption()
void convertToManaged()
Mono<Void> convertToManagedAsync()
com.azure.core.http.rest.PagedIterable<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 existsMono<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 existsVirtualMachineInstanceView refreshInstanceView()
The instance view will be cached for later retrieval using instanceView
.
Mono<VirtualMachineInstanceView> refreshInstanceViewAsync()
RunCommandResult runPowerShellScript(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
scriptLines
- PowerShell script linesscriptParameters
- script parametersMono<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 parametersMono<RunCommandResult> runShellScriptAsync(List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
scriptLines
- shell script linesscriptParameters
- script parametersRunCommandResult runCommand(RunCommandInput inputCommand)
inputCommand
- command inputMono<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()
Mono<List<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
.
Set<AvailabilityZoneId> availabilityZones()
boolean isBootDiagnosticsEnabled()
String bootDiagnosticsStorageUri()
boolean isManagedServiceIdentityEnabled()
String systemAssignedManagedServiceIdentityTenantId()
String systemAssignedManagedServiceIdentityPrincipalId()
ResourceIdentityType managedServiceIdentityType()
Set<String> userAssignedManagedServiceIdentityIds()
VirtualMachinePriorityTypes priority()
VirtualMachineEvictionPolicyTypes evictionPolicy()
BillingProfile billingProfile()
Copyright © 2020 Microsoft Corporation. All rights reserved.