Interface VirtualMachineScaleSet

All Superinterfaces:
GroupableResource<ComputeManager,VirtualMachineScaleSetInner>, HasId, HasInnerModel<VirtualMachineScaleSetInner>, HasManager<ComputeManager>, HasName, HasResourceGroup, Indexable, Refreshable<VirtualMachineScaleSet>, Resource, Updatable<VirtualMachineScaleSet.UpdateStages.WithPrimaryLoadBalancer>

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

    • virtualMachines

      VirtualMachineScaleSetVMs virtualMachines()
      Gets entry point to manage virtual machine instances in the scale set..
      Returns:
      entry point to manage virtual machine instances in the scale set.
    • listAvailableSkus

      com.azure.core.http.rest.PagedIterable<VirtualMachineScaleSetSku> listAvailableSkus()
      Gets available SKUs for the virtual machine scale set.
      Returns:
      available SKUs for the virtual machine scale set, including the minimum and maximum virtual machine instances allowed for a particular SKU
    • deallocate

      void deallocate()
      Shuts down the virtual machines in the scale set and releases its compute resources.
    • deallocateAsync

      Mono<Void> deallocateAsync()
      Shuts down the virtual machines in the scale set and releases its compute resources asynchronously.
      Returns:
      a representation of the deferred computation of this call
    • powerOff

      void powerOff()
      Powers off (stops) the virtual machines in the scale set.
    • powerOffAsync

      Mono<Void> powerOffAsync()
      Powers off (stops) the virtual machines in the scale set asynchronously.
      Returns:
      a representation of the deferred computation of this call
    • restart

      void restart()
      Restarts the virtual machines in the scale set.
    • restartAsync

      Mono<Void> restartAsync()
      Restarts the virtual machines in the scale set asynchronously.
      Returns:
      a representation of the deferred computation of this call
    • start

      void start()
      Starts the virtual machines in the scale set.
    • startAsync

      Mono<Void> startAsync()
      Starts the virtual machines in the scale set asynchronously.
      Returns:
      a representation of the deferred computation of this call
    • reimage

      void reimage()
      Re-images (updates the version of the installed operating system) the virtual machines in the scale set.
    • reimageAsync

      Mono<Void> reimageAsync()
      Re-images (updates the version of the installed operating system) the virtual machines in the scale set asynchronously.
      Returns:
      a representation of the deferred computation of this call
    • runPowerShellScriptInVMInstance

      RunCommandResult runPowerShellScriptInVMInstance(String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run PowerShell script in a virtual machine instance in a scale set.
      Parameters:
      vmId - the virtual machine instance id
      scriptLines - PowerShell script lines
      scriptParameters - script parameters
      Returns:
      result of PowerShell script execution
    • runPowerShellScriptInVMInstanceAsync

      Mono<RunCommandResult> runPowerShellScriptInVMInstanceAsync(String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run PowerShell in a virtual machine instance in a scale set asynchronously.
      Parameters:
      vmId - the virtual machine instance id
      scriptLines - PowerShell script lines
      scriptParameters - script parameters
      Returns:
      handle to the asynchronous execution
    • runShellScriptInVMInstance

      RunCommandResult runShellScriptInVMInstance(String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run shell script in a virtual machine instance in a scale set.
      Parameters:
      vmId - the virtual machine instance id
      scriptLines - shell script lines
      scriptParameters - script parameters
      Returns:
      result of shell script execution
    • runShellScriptInVMInstanceAsync

      Mono<RunCommandResult> runShellScriptInVMInstanceAsync(String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)
      Run shell script in a virtual machine instance in a scale set asynchronously.
      Parameters:
      vmId - the virtual machine instance id
      scriptLines - shell script lines
      scriptParameters - script parameters
      Returns:
      handle to the asynchronous execution
    • runCommandInVMInstance

      RunCommandResult runCommandInVMInstance(String vmId, RunCommandInput inputCommand)
      Run commands in a virtual machine instance in a scale set.
      Parameters:
      vmId - the virtual machine instance id
      inputCommand - command input
      Returns:
      result of execution
    • runCommandVMInstanceAsync

      Mono<RunCommandResult> runCommandVMInstanceAsync(String vmId, RunCommandInput inputCommand)
      Run commands in a virtual machine instance in a scale set asynchronously.
      Parameters:
      vmId - the virtual machine instance id
      inputCommand - command input
      Returns:
      handle to the asynchronous execution
    • computerNamePrefix

      String computerNamePrefix()
      Gets the name prefix of the virtual machines in the scale set.
      Returns:
      the name prefix of the virtual machines in the scale set
    • osType

      Gets the operating system of the virtual machines in the scale set.
      Returns:
      the operating system of the virtual machines in the scale set
    • osDiskCachingType

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

      String osDiskName()
      Gets the name of the OS disk of virtual machines in the scale set.
      Returns:
      the name of the OS disk of virtual machines in the scale set
    • isEphemeralOSDisk

      boolean isEphemeralOSDisk()
      Checks whether the instance OS disk is ephemeral.
      Returns:
      whether the instance OS disk is ephemeral
    • upgradeModel

      UpgradeMode upgradeModel()
      Gets the upgrade model, null for scale set with OrchestrationMode.FLEXIBLE.
      Returns:
      the upgrade model, null for scale set with OrchestrationMode.FLEXIBLE
    • overProvisionEnabled

      boolean overProvisionEnabled()
      Checks whether over provision is enabled for the virtual machines.
      Returns:
      true if over provision is enabled for the virtual machines, false otherwise
    • sku

      Gets the SKU of the virtual machines in the scale set.
      Returns:
      the SKU of the virtual machines in the scale set
    • capacity

      int capacity()
      Gets the number of virtual machine instances in the scale set.
      Returns:
      the number of virtual machine instances in the scale set
    • getPrimaryNetwork

      Network getPrimaryNetwork() throws IOException
      Gets the virtual network associated with the primary network interfaces of the virtual machines in the scale set.
      Returns:
      the virtual network associated with the primary network interfaces of the virtual machines in the scale set.

      A primary internal load balancer associated with the primary network interfaces of the scale set virtual machine will be also belong to this network

      Throws:
      IOException - the IO exception
    • getPrimaryInternetFacingLoadBalancer

      LoadBalancer getPrimaryInternetFacingLoadBalancer() throws IOException
      Gets the Internet-facing load balancer associated with the primary network interface of the virtual machines in the scale set.
      Returns:
      the Internet-facing load balancer associated with the primary network interface of the virtual machines in the scale set.
      Throws:
      IOException - the IO exception
    • listPrimaryInternetFacingLoadBalancerBackends

      Map<String,LoadBalancerBackend> listPrimaryInternetFacingLoadBalancerBackends() throws IOException
      Gets the Internet-facing load balancer's backends associated with the primary network interface of the virtual machines in the scale set.
      Returns:
      the Internet-facing load balancer's backends associated with the primary network interface of the virtual machines in the scale set
      Throws:
      IOException - the IO exception
    • listPrimaryInternetFacingLoadBalancerInboundNatPools

      Map<String,LoadBalancerInboundNatPool> listPrimaryInternetFacingLoadBalancerInboundNatPools() throws IOException
      Gets the Internet-facing load balancer's inbound NAT pool associated with the primary network interface of the virtual machines in the scale set.
      Returns:
      the Internet-facing load balancer's inbound NAT pool associated with the primary network interface of the virtual machines in the scale set
      Throws:
      IOException - the IO exception
    • getPrimaryInternalLoadBalancer

      LoadBalancer getPrimaryInternalLoadBalancer() throws IOException
      Gets the internal load balancer associated with the primary network interface of the virtual machines in the scale set.
      Returns:
      the internal load balancer associated with the primary network interface of the virtual machines in the scale set
      Throws:
      IOException - the IO exception
    • listPrimaryInternalLoadBalancerBackends

      Map<String,LoadBalancerBackend> listPrimaryInternalLoadBalancerBackends() throws IOException
      Gets the internal load balancer's backends associated with the primary network interface of the virtual machines in the scale set.
      Returns:
      the internal load balancer's backends associated with the primary network interface of the virtual machines in the scale set
      Throws:
      IOException - the IO exception
    • listPrimaryInternalLoadBalancerInboundNatPools

      Map<String,LoadBalancerInboundNatPool> listPrimaryInternalLoadBalancerInboundNatPools() throws IOException
      Gets the inbound NAT pools of the internal load balancer associated with the primary network interface of the virtual machines in the scale set.
      Returns:
      the inbound NAT pools of the internal load balancer associated with the primary network interface of the virtual machines in the scale set, if any.
      Throws:
      IOException - the IO exception
    • primaryPublicIpAddressIds

      List<String> primaryPublicIpAddressIds() throws IOException
      Gets the list of IDs of the public IP addresses associated with the primary Internet-facing load balancer of the scale set
      Returns:
      the list of IDs of the public IP addresses associated with the primary Internet-facing load balancer of the scale set
      Throws:
      IOException - the IO exception
    • vhdContainers

      List<String> vhdContainers()
      Gets the URL to storage containers that store the VHDs of the virtual machines in the scale set.
      Returns:
      the URL to storage containers that store the VHDs of the virtual machines in the scale set
    • storageProfile

      Gets the storage profile.
      Returns:
      the storage profile
    • networkProfile

      Gets the network profile.
      Returns:
      the network profile
    • extensions

      Gets the extensions attached to the virtual machines in the scale set.
      Returns:
      the extensions attached to the virtual machines in the scale set
    • virtualMachinePriority

      VirtualMachinePriorityTypes virtualMachinePriority()
      Gets the priority of virtual machines in the scale set.
      Returns:
      the priority of virtual machines in the scale set.
    • billingProfile

      BillingProfile billingProfile()
      Gets the billing related details of the low priority virtual machines in the scale set.
      Returns:
      the billing related details of the low priority virtual machines in the scale set.
    • virtualMachineEvictionPolicy

      VirtualMachineEvictionPolicyTypes virtualMachineEvictionPolicy()
      Gets the eviction policy of the virtual machines in the scale set.
      Returns:
      the eviction policy of the virtual machines in the scale set.
    • getNetworkInterfaceByInstanceId

      VirtualMachineScaleSetNetworkInterface getNetworkInterfaceByInstanceId(String instanceId, String name)
      Gets a network interface associated with a virtual machine scale set instance.
      Parameters:
      instanceId - the virtual machine scale set vm instance ID
      name - the network interface name
      Returns:
      the network interface
    • getNetworkInterfaceByInstanceIdAsync

      Mono<VirtualMachineScaleSetNetworkInterface> getNetworkInterfaceByInstanceIdAsync(String instanceId, String name)
      Gets a network interface associated with a virtual machine scale set instance.
      Parameters:
      instanceId - the virtual machine scale set vm instance ID
      name - the network interface name
      Returns:
      the network interface
    • listNetworkInterfaces

      com.azure.core.http.rest.PagedIterable<VirtualMachineScaleSetNetworkInterface> listNetworkInterfaces()
      Gets the network interfaces associated with all virtual machine instances in a scale set.
      Returns:
      the network interfaces associated with all virtual machine instances in a scale set
    • listNetworkInterfacesByInstanceId

      com.azure.core.http.rest.PagedIterable<VirtualMachineScaleSetNetworkInterface> listNetworkInterfacesByInstanceId(String virtualMachineInstanceId)
      Lists the network interface associated with a specific virtual machine instance in the scale set.
      Parameters:
      virtualMachineInstanceId - the instance ID
      Returns:
      the network interfaces
    • listNetworkInterfacesByInstanceIdAsync

      com.azure.core.http.rest.PagedFlux<VirtualMachineScaleSetNetworkInterface> listNetworkInterfacesByInstanceIdAsync(String virtualMachineInstanceId)
      Lists the network interface associated with a specific virtual machine instance in the scale set asynchronously.
      Parameters:
      virtualMachineInstanceId - the instance ID
      Returns:
      the network interfaces
    • isManagedDiskEnabled

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

      boolean isManagedServiceIdentityEnabled()
      Checks whether Managed Service Identity is enabled for the virtual machine scale set.
      Returns:
      true if Managed Service Identity is enabled for the virtual machine scale set
    • systemAssignedManagedServiceIdentityTenantId

      String systemAssignedManagedServiceIdentityTenantId()
      Gets the System Assigned (Local) Managed Service Identity specific Active Directory tenant ID assigned to the virtual machine scale set.
      Returns:
      the System Assigned (Local) Managed Service Identity specific Active Directory tenant ID assigned to the virtual machine scale set.
    • systemAssignedManagedServiceIdentityPrincipalId

      String systemAssignedManagedServiceIdentityPrincipalId()
      Gets the System Assigned (Local) Managed Service Identity specific Active Directory service principal ID assigned to the virtual machine scale set.
      Returns:
      the System Assigned (Local) Managed Service Identity specific Active Directory service principal ID assigned to the virtual machine scale set.
    • managedServiceIdentityType

      ResourceIdentityType managedServiceIdentityType()
      Gets the type of Managed Service Identity used for the virtual machine scale set.
      Returns:
      the type of Managed Service Identity used for the virtual machine scale set.
    • userAssignedManagedServiceIdentityIds

      Set<String> userAssignedManagedServiceIdentityIds()
      Gets the resource ids of User Assigned Managed Service Identities associated with the virtual machine scale set.
      Returns:
      the resource ids of User Assigned Managed Service Identities associated with the virtual machine scale set.
    • availabilityZones

      Set<AvailabilityZoneId> availabilityZones()
      Gets the availability zones assigned to virtual machine scale set.
      Returns:
      the availability zones assigned to virtual machine scale set.
    • isBootDiagnosticsEnabled

      boolean isBootDiagnosticsEnabled()
      Checks whether boot diagnostics is enabled for the virtual machine scale set.
      Returns:
      true if boot diagnostics is enabled for the virtual machine scale set.
    • bootDiagnosticsStorageUri

      String bootDiagnosticsStorageUri()
      Gets the storage blob endpoint uri.
      Returns:
      the storage blob endpoint uri if boot diagnostics is enabled for the virtual machine scale set.
    • managedOSDiskStorageAccountType

      StorageAccountTypes managedOSDiskStorageAccountType()
      Gets the storage account type of the OS managed disk.
      Returns:
      the storage account type of the OS managed disk. A null value will be returned if the virtual machine scale set is based on un-managed disk.
    • virtualMachinePublicIpConfig

      Gets the public ip configuration of virtual machines in the scale set.
      Returns:
      the public ip configuration of virtual machines in the scale set.
    • isIpForwardingEnabled

      boolean isIpForwardingEnabled()
      Checks whether ip forwarding is enabled for the virtual machine scale set.
      Returns:
      true if ip forwarding is enabled for the virtual machine scale set.
    • isAcceleratedNetworkingEnabled

      boolean isAcceleratedNetworkingEnabled()
      Checks whether accelerated networking is enabled for the virtual machine scale set.
      Returns:
      true if accelerated networking is enabled for the virtual machine scale set.
    • networkSecurityGroupId

      String networkSecurityGroupId()
      Gets the network security group ARM id.
      Returns:
      the network security group ARM id.
    • isSinglePlacementGroupEnabled

      boolean isSinglePlacementGroupEnabled()
      Checks whether single placement group is enabled for the virtual machine scale set.
      Returns:
      true if single placement group is enabled for the virtual machine scale set.
    • applicationGatewayBackendAddressPoolsIds

      List<String> applicationGatewayBackendAddressPoolsIds()
      Gets the list of application gateway backend pool associated with the virtual machine scale set.
      Returns:
      the list of application gateway backend pool associated with the virtual machine scale set.
    • applicationSecurityGroupIds

      List<String> applicationSecurityGroupIds()
      Gets the list of application security groups associated with the virtual machine scale set.
      Returns:
      the list of application security groups associated with the virtual machine scale set.
    • doNotRunExtensionsOnOverprovisionedVMs

      Boolean doNotRunExtensionsOnOverprovisionedVMs()
      Checks whether Overprovision is enabled.
      Returns:
      When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
    • proximityPlacementGroup

      ProximityPlacementGroup proximityPlacementGroup()
      Get specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
      Returns:
      the proximityPlacementGroup.
    • additionalCapabilities

      AdditionalCapabilities additionalCapabilities()
      Get specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
      Returns:
      the additionalCapabilities value
    • plan

      Plan plan()
      Gets the purchase plan information about marketplace image.
      Returns:
      the purchase plan information about marketplace image
    • orchestrationMode

      OrchestrationMode orchestrationMode()
      Get orchestration mode of the Virtual Machine Scale Set. Scale set orchestration modes allow you to have greater control over how virtual machine instances are managed by the scale set.
      Returns:
      the orchestration mode of the virtual machine scale set