Interface VirtualMachineScaleSetVM

All Superinterfaces:
ChildResource<VirtualMachineScaleSet>, HasId, HasInnerModel<VirtualMachineScaleSetVMInner>, HasName, HasParent<VirtualMachineScaleSet>, Indexable, Refreshable<VirtualMachineScaleSetVM>, Resource, Updatable<VirtualMachineScaleSetVM.Update>

An immutable client-side representation of a virtual machine instance in an Azure virtual machine scale set.
  • Method Details

    • instanceId

      String instanceId()
      Gets the instance ID assigned to this virtual machine instance.
      Returns:
      the instance ID assigned to this virtual machine instance
    • sku

      Sku sku()
      Gets the SKU of the virtual machine instance.
      Returns:
      the SKU of the virtual machine instance, this will be SKU used while creating the parent virtual machine scale set
    • size

      Gets virtual machine instance size.
      Returns:
      virtual machine instance size
    • isLatestScaleSetUpdateApplied

      boolean isLatestScaleSetUpdateApplied()
      Checks whether the latest scale set model changes are applied to the virtual machine instance.
      Returns:
      true if the latest scale set model changes are applied to the virtual machine instance
    • isOSBasedOnPlatformImage

      boolean isOSBasedOnPlatformImage()
      Checks whether the operating system of the virtual machine instance is based on platform image.
      Returns:
      true if the operating system of the virtual machine instance is based on platform image
    • isOSBasedOnCustomImage

      boolean isOSBasedOnCustomImage()
      Checks whether the operating system of the virtual machine instance is based on custom image.
      Returns:
      true if the operating system of the virtual machine instance is based on custom image
    • isOSBasedOnStoredImage

      boolean isOSBasedOnStoredImage()
      Checks whether the operating system of the virtual machine instance is based on stored image.
      Returns:
      true if the operating system of the virtual machine instance is based on stored image
    • platformImageReference

      ImageReference platformImageReference()
      Gets reference to the platform image.
      Returns:
      reference to the platform image that the virtual machine instance operating system is based on, null will be returned if the operating system is based on custom image
    • getOSPlatformImage

      VirtualMachineImage getOSPlatformImage()
      Gets the platform image.
      Returns:
      the platform image that the virtual machine instance operating system is based on, null be returned otherwise
    • getOSCustomImage

      VirtualMachineCustomImage getOSCustomImage()
      Gets the custom image.
      Returns:
      the custom image that the virtual machine instance operating system is based on, null be returned otherwise
    • storedImageUnmanagedVhdUri

      String storedImageUnmanagedVhdUri()
      Gets VHD URI of the custom image.
      Returns:
      VHD URI of the custom image that the virtual machine instance operating system is based on, null will be returned if the operating system is based on platform image
    • osDiskName

      String osDiskName()
      Gets the name of the operating system disk.
      Returns:
      the name of the operating system disk
    • osUnmanagedDiskVhdUri

      String osUnmanagedDiskVhdUri()
      Gets VHD URI to the operating system disk.
      Returns:
      VHD URI to the operating system disk
    • osDiskId

      String osDiskId()
      Gets resource ID of the managed disk backing OS disk.
      Returns:
      resource ID of the managed disk backing OS disk
    • unmanagedDataDisks

      Gets the unmanaged data disks associated with this virtual machine instance.
      Returns:
      the unmanaged data disks associated with this virtual machine instance, indexed by LUN
    • dataDisks

      Gets the managed data disks associated with this virtual machine instance.
      Returns:
      the managed data disks associated with this virtual machine instance, indexed by LUN
    • osDiskCachingType

      CachingTypes osDiskCachingType()
      Gets the caching type of the operating system disk.
      Returns:
      the caching type of the operating system disk
    • osDiskSizeInGB

      int osDiskSizeInGB()
      Gets the size of the operating system disk.
      Returns:
      the size of the operating system disk
    • computerName

      String computerName()
      Gets the virtual machine instance computer name with the VM scale set prefix.
      Returns:
      the virtual machine instance computer name with the VM scale set prefix.
    • administratorUserName

      String administratorUserName()
      Gets the name of the admin user.
      Returns:
      the name of the admin user
    • osType

      Gets the operating system type.
      Returns:
      the operating system type
    • isLinuxPasswordAuthenticationEnabled

      boolean isLinuxPasswordAuthenticationEnabled()
      Checks whether this is a Linux virtual machine and password based login is enabled.
      Returns:
      true if this is a Linux virtual machine and password based login is enabled, false otherwise
    • isWindowsVMAgentProvisioned

      boolean isWindowsVMAgentProvisioned()
      Checks whether this is a Windows virtual machine and VM agent is provisioned.
      Returns:
      true if this is a Windows virtual machine and VM agent is provisioned, false otherwise
    • isWindowsAutoUpdateEnabled

      boolean isWindowsAutoUpdateEnabled()
      Checks whether this is a Windows virtual machine and automatic update is turned on.
      Returns:
      true if this is a Windows virtual machine and automatic update is turned on, false otherwise
    • windowsTimeZone

      String windowsTimeZone()
      Gets the time zone of the Windows virtual machine.
      Returns:
      the time zone of the Windows virtual machine
    • bootDiagnosticEnabled

      boolean bootDiagnosticEnabled()
      Checks whether the boot diagnostic is enabled.
      Returns:
      true if the boot diagnostic is enabled, false otherwise
    • bootDiagnosticStorageAccountUri

      String bootDiagnosticStorageAccountUri()
      Gets the URI to the storage account storing boot diagnostics log.
      Returns:
      the URI to the storage account storing boot diagnostics log
    • availabilitySetId

      String availabilitySetId()
      Gets the resource ID of the availability set that this virtual machine instance belongs to.
      Returns:
      the resource ID of the availability set that this virtual machine instance belongs to
    • networkInterfaceIds

      List<String> networkInterfaceIds()
      Gets the list of resource ID of network interface associated with the virtual machine instance.
      Returns:
      the list of resource ID of network interface associated with the virtual machine instance
    • primaryNetworkInterfaceId

      String primaryNetworkInterfaceId()
      Gets resource ID of primary network interface associated with virtual machine instance.
      Returns:
      resource ID of primary network interface associated with virtual machine instance
    • extensions

      Gets the extensions associated with the virtual machine instance, indexed by name.
      Returns:
      the extensions associated with the virtual machine instance, indexed by name
    • storageProfile

      StorageProfile storageProfile()
      Gets the storage profile of the virtual machine instance.
      Returns:
      the storage profile of the virtual machine instance
    • osProfile

      OSProfile osProfile()
      Gets the operating system profile of an virtual machine instance.
      Returns:
      the operating system profile of an virtual machine instance
    • diagnosticsProfile

      DiagnosticsProfile diagnosticsProfile()
      Gets the diagnostics profile of the virtual machine instance.
      Returns:
      the diagnostics profile of the virtual machine instance
    • isManagedDiskEnabled

      boolean isManagedDiskEnabled()
      Checks whether managed disk is used for the virtual machine's disks (os, data).
      Returns:
      true if managed disk is used for the virtual machine's disks (os, data)
    • redeploy

      void redeploy()
      Shuts down the virtual machine instance, move them to new node, and powers them back on.
    • redeployAsync

      Mono<Void> redeployAsync()
      Shuts down the virtual machine instance, move them to new node, and powers them back on.
      Returns:
      a representation of the deferred computation of this call
    • reimage

      void reimage()
      Updates the version of the installed operating system in the virtual machine instance.
    • reimageAsync

      Mono<Void> reimageAsync()
      Updates the version of the installed operating system in the virtual machine instance.
      Returns:
      a representation of the deferred computation of this call
    • deallocate

      void deallocate()
      Shuts down the virtual machine instance and releases the associated compute resources.
    • deallocateAsync

      Mono<Void> deallocateAsync()
      Shuts down the virtual machine instance and releases the associated compute resources.
      Returns:
      a representation of the deferred computation of this call
    • powerOff

      void powerOff()
      Stops the virtual machine instance.
    • powerOffAsync

      Mono<Void> powerOffAsync()
      Stops the virtual machine instance.
      Returns:
      a representation of the deferred computation of this call
    • powerOff

      void powerOff(boolean skipShutdown)
      Stops the virtual machine instance.
      Parameters:
      skipShutdown - power off without graceful shutdown
    • powerOffAsync

      Mono<Void> powerOffAsync(boolean skipShutdown)
      Stops the virtual machine instances.
      Parameters:
      skipShutdown - power off without graceful shutdown
      Returns:
      a representation of the deferred computation of this call.
    • start

      void start()
      Starts the virtual machine instance.
    • startAsync

      Mono<Void> startAsync()
      Starts the virtual machine instance.
      Returns:
      a representation of the deferred computation of this call
    • restart

      void restart()
      Restarts the virtual machine instance.
    • restartAsync

      Mono<Void> restartAsync()
      Restarts the virtual machine instance.
      Returns:
      a representation of the deferred computation of this call
    • delete

      void delete()
      Deletes the virtual machine instance.
    • deleteAsync

      Mono<Void> deleteAsync()
      Deletes the virtual machine instance.
      Returns:
      a representation of the deferred computation of this call
    • instanceView

      Gets the instance view of the virtual machine instance.

      To get the latest instance view use refreshInstanceView().

      Returns:
      the instance view
    • refreshInstanceView

      VirtualMachineInstanceView refreshInstanceView()
      Refreshes the instance view.
      Returns:
      the instance view
    • refreshInstanceViewAsync

      Mono<VirtualMachineInstanceView> refreshInstanceViewAsync()
      Refreshes the instance view.
      Returns:
      an observable that emits the instance view of the virtual machine instance.
    • powerState

      PowerState powerState()
      Gets the power state of the virtual machine instance.
      Returns:
      the power state of the virtual machine instance
    • getNetworkInterface

      Gets a network interface associated with this virtual machine instance.
      Parameters:
      name - the name of the network interface
      Returns:
      the network interface
    • getNetworkInterfaceAsync

      Mono<VirtualMachineScaleSetNetworkInterface> getNetworkInterfaceAsync(String name)
      Gets a network interface associated with this virtual machine instance.
      Parameters:
      name - the name of the network interface
      Returns:
      the network interface
    • listNetworkInterfaces

      com.azure.core.http.rest.PagedIterable<VirtualMachineScaleSetNetworkInterface> listNetworkInterfaces()
      Gets the network interfaces associated with this virtual machine instance.
      Returns:
      the network interfaces associated with this virtual machine instance.
    • listNetworkInterfacesAsync

      com.azure.core.http.rest.PagedFlux<VirtualMachineScaleSetNetworkInterface> listNetworkInterfacesAsync()
      Gets the network interfaces associated with this virtual machine instance.
      Returns:
      the network interfaces associated with this virtual machine instance.
    • modelDefinitionApplied

      String modelDefinitionApplied()
      Gets applied model from the virtual machine.
      Returns:
      Get specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.
    • protectionPolicy

      Gets the specific protection policy for the vm.
      Returns:
      The specific protection policy for the vm.
    • networkProfileConfiguration

      Gets the network profile config for the vm.
      Returns:
      The network profile config for the vm.
    • timeCreated

      OffsetDateTime timeCreated()
      Gets the time at which the Virtual Machine resource was created.
      Returns:
      the time at which the Virtual Machine resource was created