IVirtualMachine IVirtualMachine IVirtualMachine Interface

Definition

An immutable client-side representation of an Azure virtual machine.

public interface IVirtualMachine : Microsoft.Azure.Management.Compute.Fluent.IVirtualMachineBeta, Microsoft.Azure.Management.Network.Fluent.IHasNetworkInterfaces, Microsoft.Azure.Management.ResourceManager.Fluent.Core.IBeta, Microsoft.Azure.Management.ResourceManager.Fluent.Core.IGroupableResource<Microsoft.Azure.Management.Compute.Fluent.IComputeManager,Microsoft.Azure.Management.Compute.Fluent.Models.VirtualMachineInner>, Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasInner<Microsoft.Azure.Management.Compute.Fluent.Models.VirtualMachineInner>, Microsoft.Azure.Management.ResourceManager.Fluent.Core.IHasManager<Microsoft.Azure.Management.Compute.Fluent.IComputeManager>, Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.IRefreshable<Microsoft.Azure.Management.Compute.Fluent.IVirtualMachine>, Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.IUpdatable<Microsoft.Azure.Management.Compute.Fluent.VirtualMachine.Update.IUpdate>
type IVirtualMachine = interface
    interface IGroupableResource<IComputeManager, VirtualMachineInner>
    interface IResource
    interface IIndexable
    interface IHasId
    interface IHasName
    interface IHasResourceGroup
    interface IHasManager<IComputeManager>
    interface IHasInner<VirtualMachineInner>
    interface IRefreshable<IVirtualMachine>
    interface IUpdatable<IUpdate>
    interface IHasNetworkInterfaces
    interface IVirtualMachineBeta
    interface IBeta
Public Interface IVirtualMachine
Implements IBeta, IGroupableResource(Of IComputeManager, VirtualMachineInner), IHasInner(Of VirtualMachineInner), IHasManager(Of IComputeManager), IHasNetworkInterfaces, IRefreshable(Of IVirtualMachine), IUpdatable(Of IUpdate), IVirtualMachineBeta
Implements

Properties

AvailabilitySetId AvailabilitySetId AvailabilitySetId

Gets the resource ID of the availability set associated with this virtual machine.

AvailabilityZones AvailabilityZones AvailabilityZones

Gets the availability zones assigned to the virtual machine.

(Inherited from IVirtualMachineBeta)
BootDiagnosticsStorageUri BootDiagnosticsStorageUri BootDiagnosticsStorageUri

Gets the storage blob endpoint uri if boot diagnostics is enabled for the virtual machine.

ComputerName ComputerName ComputerName

Gets name of this virtual machine.

DataDisks DataDisks DataDisks

Gets the managed data disks associated with this virtual machine, indexed by LUN.

DiagnosticsProfile DiagnosticsProfile DiagnosticsProfile

Gets the diagnostics profile.

DiskEncryption DiskEncryption DiskEncryption

Gets entry point to enabling, disabling and querying disk encryption.

Id Id Id

Gets the resource id string

(Inherited from IHasId)
Inner Inner Inner Inherited from IHasInner<T>
InstanceView InstanceView InstanceView

Gets the virtual machine instance view. The instance view will be cached for later retrieval using

instanceView
.

IsBootDiagnosticsEnabled IsBootDiagnosticsEnabled IsBootDiagnosticsEnabled

Gets true if boot diagnostics is enabled for the virtual machine.

IsManagedDiskEnabled IsManagedDiskEnabled IsManagedDiskEnabled

Gets true if managed disks are used for the virtual machine's disks (OS, data).

IsManagedServiceIdentityEnabled IsManagedServiceIdentityEnabled IsManagedServiceIdentityEnabled

Gets true if Managed Service Identity is enabled for the virtual machine.

(Inherited from IVirtualMachineBeta)
Key Key Key Inherited from IIndexable
LicenseType LicenseType LicenseType

Gets the licenseType value.

ManagedServiceIdentityType ManagedServiceIdentityType ManagedServiceIdentityType

Gets the type of Managed Service Identity used for the virtual machine.

(Inherited from IVirtualMachineBeta)
Manager Manager Manager

Gets the manager client type of this resource type.

(Inherited from IHasManager<ManagerT>)
Name Name Name

Gets the name of the resource

(Inherited from IHasName)
NetworkInterfaceIds NetworkInterfaceIds NetworkInterfaceIds

Gets the list of resource IDs of the network interfaces associated with this resource.

(Inherited from IHasNetworkInterfaces)
OSDiskCachingType OSDiskCachingType OSDiskCachingType

Gets the operating system disk caching type.

OSDiskId OSDiskId OSDiskId

Gets resource ID of the managed disk backing the OS disk.

OSDiskSize OSDiskSize OSDiskSize

Gets the size of the operating system disk in GB.

OSDiskStorageAccountType OSDiskStorageAccountType OSDiskStorageAccountType

Gets the storage account type of the managed disk backing OS disk.

OSProfile OSProfile OSProfile

Gets the operating system profile.

OSType OSType OSType

Gets the operating system of this virtual machine.

OSUnmanagedDiskVhdUri OSUnmanagedDiskVhdUri OSUnmanagedDiskVhdUri

Gets the URI to the VHD file backing this virtual machine's operating system disk.

Plan Plan Plan

Gets the plan value.

PowerState PowerState PowerState

Gets the power state of the virtual machine.

PrimaryNetworkInterfaceId PrimaryNetworkInterfaceId PrimaryNetworkInterfaceId

Gets the resource id of the primary network interface associated with this resource.

(Inherited from IHasNetworkInterfaces)
ProvisioningState ProvisioningState ProvisioningState

Gets the provisioningState value.

Region Region Region Inherited from IResource
RegionName RegionName RegionName Inherited from IResource
ResourceGroupName ResourceGroupName ResourceGroupName Inherited from IHasResourceGroup
Size Size Size

Gets the virtual machine size.

StorageProfile StorageProfile StorageProfile

Gets Returns the storage profile of an Azure virtual machine.

SystemAssignedManagedServiceIdentityPrincipalId SystemAssignedManagedServiceIdentityPrincipalId SystemAssignedManagedServiceIdentityPrincipalId

Gets the System Assigned (Local) Managed Service Identity specific Active Directory service principal ID assigned to the virtual machine.

(Inherited from IVirtualMachineBeta)
SystemAssignedManagedServiceIdentityTenantId SystemAssignedManagedServiceIdentityTenantId SystemAssignedManagedServiceIdentityTenantId

Gets the System Assigned (Local) Managed Service Identity specific Active Directory tenant ID assigned to the virtual machine.

(Inherited from IVirtualMachineBeta)
Tags Tags Tags Inherited from IResource
Type Type Type Inherited from IResource
UnmanagedDataDisks UnmanagedDataDisks UnmanagedDataDisks

Gets the unmanaged data disks associated with this virtual machine, indexed by LUN number.

UserAssignedManagedServiceIdentityIds UserAssignedManagedServiceIdentityIds UserAssignedManagedServiceIdentityIds

Gets the resource ids of User Assigned Managed Service Identities associated with the virtual machine.

(Inherited from IVirtualMachineBeta)
VMId VMId VMId

Gets the virtual machine unique ID.

Methods

AvailableSizes() AvailableSizes() AvailableSizes()

Lists all available virtual machine sizes this virtual machine can resized to.

Capture(String, String, Boolean) Capture(String, String, Boolean) Capture(String, String, Boolean)

Captures the virtual machine by copying virtual hard disks of the VM.

CaptureAsync(String, String, Boolean, CancellationToken) CaptureAsync(String, String, Boolean, CancellationToken) CaptureAsync(String, String, Boolean, CancellationToken)

Captures the virtual machine by copying virtual hard disks of the VM asynchronously.

ConvertToManaged() ConvertToManaged() ConvertToManaged()

Converts (migrates) the virtual machine with un-managed disks to use managed disk.

ConvertToManagedAsync(CancellationToken) ConvertToManagedAsync(CancellationToken) ConvertToManagedAsync(CancellationToken)

Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.

Deallocate() Deallocate() Deallocate()

Shuts down the virtual machine and releases the compute resources.

DeallocateAsync(CancellationToken) DeallocateAsync(CancellationToken) DeallocateAsync(CancellationToken)

Shuts down the virtual machine and releases the compute resources asynchronously.

Generalize() Generalize() Generalize()

Generalizes the virtual machine.

GeneralizeAsync(CancellationToken) GeneralizeAsync(CancellationToken) GeneralizeAsync(CancellationToken)

Generalizes the virtual machine asynchronously.

GetPrimaryNetworkInterface() GetPrimaryNetworkInterface() GetPrimaryNetworkInterface()

Gets the primary network interface. Note that this method can result in a call to the cloud to fetch the network interface information.

(Inherited from IHasNetworkInterfaces)
GetPrimaryPublicIPAddress() GetPrimaryPublicIPAddress() 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.

GetPrimaryPublicIPAddressId() GetPrimaryPublicIPAddressId() GetPrimaryPublicIPAddressId()
ListExtensions() ListExtensions() ListExtensions()
ListExtensionsAsync(CancellationToken) ListExtensionsAsync(CancellationToken) ListExtensionsAsync(CancellationToken)
PowerOff() PowerOff() PowerOff()

Powers off (stops) the virtual machine.

PowerOffAsync(CancellationToken) PowerOffAsync(CancellationToken) PowerOffAsync(CancellationToken)

Powers off (stops) the virtual machine asynchronously.

Redeploy() Redeploy() Redeploy()

Redeploys the virtual machine.

RedeployAsync(CancellationToken) RedeployAsync(CancellationToken) RedeployAsync(CancellationToken)

Redeploys the virtual machine asynchronously.

Refresh() Refresh() Refresh()

Refreshes the resource to sync with Azure.

(Inherited from IRefreshable<T>)
RefreshAsync(CancellationToken) RefreshAsync(CancellationToken) RefreshAsync(CancellationToken)

Refreshes the resource to sync with Azure.

(Inherited from IRefreshable<T>)
RefreshInstanceView() RefreshInstanceView() RefreshInstanceView()

Refreshes the virtual machine instance view to sync with Azure. The instance view will be cached for later retrieval using

instanceView
.

RefreshInstanceViewAsync(CancellationToken) RefreshInstanceViewAsync(CancellationToken) RefreshInstanceViewAsync(CancellationToken)

Refreshes the virtual machine instance view to sync with Azure.

Restart() Restart() Restart()

Restarts the virtual machine.

RestartAsync(CancellationToken) RestartAsync(CancellationToken) RestartAsync(CancellationToken)

Restarts the virtual machine asynchronously.

RunCommand(RunCommandInput) RunCommand(RunCommandInput) RunCommand(RunCommandInput)

Run commands in the virtual machine.

(Inherited from IVirtualMachineBeta)
RunCommandAsync(RunCommandInput, CancellationToken) RunCommandAsync(RunCommandInput, CancellationToken) RunCommandAsync(RunCommandInput, CancellationToken)

Run commands in the virtual machine asynchronously.

(Inherited from IVirtualMachineBeta)
RunPowerShellScript(IList<String>, IList<RunCommandInputParameter>) RunPowerShellScript(IList<String>, IList<RunCommandInputParameter>) RunPowerShellScript(IList<String>, IList<RunCommandInputParameter>)

Run shell script in a virtual machine.

(Inherited from IVirtualMachineBeta)
RunPowerShellScriptAsync(IList<String>, IList<RunCommandInputParameter>, CancellationToken) RunPowerShellScriptAsync(IList<String>, IList<RunCommandInputParameter>, CancellationToken) RunPowerShellScriptAsync(IList<String>, IList<RunCommandInputParameter>, CancellationToken)

Run shell script in the virtual machine asynchronously.

(Inherited from IVirtualMachineBeta)
RunShellScript(IList<String>, IList<RunCommandInputParameter>) RunShellScript(IList<String>, IList<RunCommandInputParameter>) RunShellScript(IList<String>, IList<RunCommandInputParameter>)

Run shell script in the virtual machine.

(Inherited from IVirtualMachineBeta)
RunShellScriptAsync(IList<String>, IList<RunCommandInputParameter>, CancellationToken) RunShellScriptAsync(IList<String>, IList<RunCommandInputParameter>, CancellationToken) RunShellScriptAsync(IList<String>, IList<RunCommandInputParameter>, CancellationToken)

Run shell script in the virtual machine asynchronously.

(Inherited from IVirtualMachineBeta)
Start() Start() Start()

Starts the virtual machine.

StartAsync(CancellationToken) StartAsync(CancellationToken) StartAsync(CancellationToken)

Starts the virtual machine asynchronously.

Update() Update() Update() Inherited from IUpdatable<T>

Applies to