Class VirtualMachineScaleSetProperties

java.lang.Object
com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualMachineScaleSetProperties>

public final class VirtualMachineScaleSetProperties extends Object implements com.azure.json.JsonSerializable<VirtualMachineScaleSetProperties>
Describes the properties of a Virtual Machine Scale Set.
  • Constructor Details

    • VirtualMachineScaleSetProperties

      public VirtualMachineScaleSetProperties()
      Creates an instance of VirtualMachineScaleSetProperties class.
  • Method Details

    • upgradePolicy

      public UpgradePolicy upgradePolicy()
      Get the upgradePolicy property: The upgrade policy.
      Returns:
      the upgradePolicy value.
    • withUpgradePolicy

      public VirtualMachineScaleSetProperties withUpgradePolicy(UpgradePolicy upgradePolicy)
      Set the upgradePolicy property: The upgrade policy.
      Parameters:
      upgradePolicy - the upgradePolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • scheduledEventsPolicy

      public ScheduledEventsPolicy scheduledEventsPolicy()
      Get the scheduledEventsPolicy property: The ScheduledEventsPolicy.
      Returns:
      the scheduledEventsPolicy value.
    • withScheduledEventsPolicy

      public VirtualMachineScaleSetProperties withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy)
      Set the scheduledEventsPolicy property: The ScheduledEventsPolicy.
      Parameters:
      scheduledEventsPolicy - the scheduledEventsPolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • automaticRepairsPolicy

      public AutomaticRepairsPolicy automaticRepairsPolicy()
      Get the automaticRepairsPolicy property: Policy for automatic repairs.
      Returns:
      the automaticRepairsPolicy value.
    • withAutomaticRepairsPolicy

      public VirtualMachineScaleSetProperties withAutomaticRepairsPolicy(AutomaticRepairsPolicy automaticRepairsPolicy)
      Set the automaticRepairsPolicy property: Policy for automatic repairs.
      Parameters:
      automaticRepairsPolicy - the automaticRepairsPolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • virtualMachineProfile

      public VirtualMachineScaleSetVMProfile virtualMachineProfile()
      Get the virtualMachineProfile property: The virtual machine profile.
      Returns:
      the virtualMachineProfile value.
    • withVirtualMachineProfile

      public VirtualMachineScaleSetProperties withVirtualMachineProfile(VirtualMachineScaleSetVMProfile virtualMachineProfile)
      Set the virtualMachineProfile property: The virtual machine profile.
      Parameters:
      virtualMachineProfile - the virtualMachineProfile value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • provisioningState

      public String provisioningState()
      Get the provisioningState property: The provisioning state, which only appears in the response.
      Returns:
      the provisioningState value.
    • overprovision

      public Boolean overprovision()
      Get the overprovision property: Specifies whether the Virtual Machine Scale Set should be overprovisioned.
      Returns:
      the overprovision value.
    • withOverprovision

      public VirtualMachineScaleSetProperties withOverprovision(Boolean overprovision)
      Set the overprovision property: Specifies whether the Virtual Machine Scale Set should be overprovisioned.
      Parameters:
      overprovision - the overprovision value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • doNotRunExtensionsOnOverprovisionedVMs

      public Boolean doNotRunExtensionsOnOverprovisionedVMs()
      Get the doNotRunExtensionsOnOverprovisionedVMs property: 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.
      Returns:
      the doNotRunExtensionsOnOverprovisionedVMs value.
    • withDoNotRunExtensionsOnOverprovisionedVMs

      public VirtualMachineScaleSetProperties withDoNotRunExtensionsOnOverprovisionedVMs(Boolean doNotRunExtensionsOnOverprovisionedVMs)
      Set the doNotRunExtensionsOnOverprovisionedVMs property: 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.
      Parameters:
      doNotRunExtensionsOnOverprovisionedVMs - the doNotRunExtensionsOnOverprovisionedVMs value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • uniqueId

      public String uniqueId()
      Get the uniqueId property: Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
      Returns:
      the uniqueId value.
    • singlePlacementGroup

      public Boolean singlePlacementGroup()
      Get the singlePlacementGroup property: When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
      Returns:
      the singlePlacementGroup value.
    • withSinglePlacementGroup

      public VirtualMachineScaleSetProperties withSinglePlacementGroup(Boolean singlePlacementGroup)
      Set the singlePlacementGroup property: When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
      Parameters:
      singlePlacementGroup - the singlePlacementGroup value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • zoneBalance

      public Boolean zoneBalance()
      Get the zoneBalance property: Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
      Returns:
      the zoneBalance value.
    • withZoneBalance

      public VirtualMachineScaleSetProperties withZoneBalance(Boolean zoneBalance)
      Set the zoneBalance property: Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
      Parameters:
      zoneBalance - the zoneBalance value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • platformFaultDomainCount

      public Integer platformFaultDomainCount()
      Get the platformFaultDomainCount property: Fault Domain count for each placement group.
      Returns:
      the platformFaultDomainCount value.
    • withPlatformFaultDomainCount

      public VirtualMachineScaleSetProperties withPlatformFaultDomainCount(Integer platformFaultDomainCount)
      Set the platformFaultDomainCount property: Fault Domain count for each placement group.
      Parameters:
      platformFaultDomainCount - the platformFaultDomainCount value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • proximityPlacementGroup

      public com.azure.core.management.SubResource proximityPlacementGroup()
      Get the proximityPlacementGroup property: Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
      Returns:
      the proximityPlacementGroup value.
    • withProximityPlacementGroup

      public VirtualMachineScaleSetProperties withProximityPlacementGroup(com.azure.core.management.SubResource proximityPlacementGroup)
      Set the proximityPlacementGroup property: Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.
      Parameters:
      proximityPlacementGroup - the proximityPlacementGroup value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • hostGroup

      public com.azure.core.management.SubResource hostGroup()
      Get the hostGroup property: Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
      Returns:
      the hostGroup value.
    • withHostGroup

      public VirtualMachineScaleSetProperties withHostGroup(com.azure.core.management.SubResource hostGroup)
      Set the hostGroup property: Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.
      Parameters:
      hostGroup - the hostGroup value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • additionalCapabilities

      public AdditionalCapabilities additionalCapabilities()
      Get the additionalCapabilities property: 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.
    • withAdditionalCapabilities

      public VirtualMachineScaleSetProperties withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities)
      Set the additionalCapabilities property: 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.
      Parameters:
      additionalCapabilities - the additionalCapabilities value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • scaleInPolicy

      public ScaleInPolicy scaleInPolicy()
      Get the scaleInPolicy property: Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
      Returns:
      the scaleInPolicy value.
    • withScaleInPolicy

      public VirtualMachineScaleSetProperties withScaleInPolicy(ScaleInPolicy scaleInPolicy)
      Set the scaleInPolicy property: Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
      Parameters:
      scaleInPolicy - the scaleInPolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • orchestrationMode

      public OrchestrationMode orchestrationMode()
      Get the orchestrationMode property: Specifies the orchestration mode for the virtual machine scale set.
      Returns:
      the orchestrationMode value.
    • withOrchestrationMode

      public VirtualMachineScaleSetProperties withOrchestrationMode(OrchestrationMode orchestrationMode)
      Set the orchestrationMode property: Specifies the orchestration mode for the virtual machine scale set.
      Parameters:
      orchestrationMode - the orchestrationMode value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • spotRestorePolicy

      public SpotRestorePolicy spotRestorePolicy()
      Get the spotRestorePolicy property: Specifies the Spot Restore properties for the virtual machine scale set.
      Returns:
      the spotRestorePolicy value.
    • withSpotRestorePolicy

      public VirtualMachineScaleSetProperties withSpotRestorePolicy(SpotRestorePolicy spotRestorePolicy)
      Set the spotRestorePolicy property: Specifies the Spot Restore properties for the virtual machine scale set.
      Parameters:
      spotRestorePolicy - the spotRestorePolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • priorityMixPolicy

      public PriorityMixPolicy priorityMixPolicy()
      Get the priorityMixPolicy property: Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
      Returns:
      the priorityMixPolicy value.
    • withPriorityMixPolicy

      public VirtualMachineScaleSetProperties withPriorityMixPolicy(PriorityMixPolicy priorityMixPolicy)
      Set the priorityMixPolicy property: Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.
      Parameters:
      priorityMixPolicy - the priorityMixPolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • timeCreated

      public OffsetDateTime timeCreated()
      Get the timeCreated property: Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.
      Returns:
      the timeCreated value.
    • constrainedMaximumCapacity

      public Boolean constrainedMaximumCapacity()
      Get the constrainedMaximumCapacity property: Optional property which must either be set to True or omitted.
      Returns:
      the constrainedMaximumCapacity value.
    • withConstrainedMaximumCapacity

      public VirtualMachineScaleSetProperties withConstrainedMaximumCapacity(Boolean constrainedMaximumCapacity)
      Set the constrainedMaximumCapacity property: Optional property which must either be set to True or omitted.
      Parameters:
      constrainedMaximumCapacity - the constrainedMaximumCapacity value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • resiliencyPolicy

      public ResiliencyPolicy resiliencyPolicy()
      Get the resiliencyPolicy property: Policy for Resiliency.
      Returns:
      the resiliencyPolicy value.
    • withResiliencyPolicy

      public VirtualMachineScaleSetProperties withResiliencyPolicy(ResiliencyPolicy resiliencyPolicy)
      Set the resiliencyPolicy property: Policy for Resiliency.
      Parameters:
      resiliencyPolicy - the resiliencyPolicy value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • zonalPlatformFaultDomainAlignMode

      public ZonalPlatformFaultDomainAlignMode zonalPlatformFaultDomainAlignMode()
      Get the zonalPlatformFaultDomainAlignMode property: Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
      Returns:
      the zonalPlatformFaultDomainAlignMode value.
    • withZonalPlatformFaultDomainAlignMode

      public VirtualMachineScaleSetProperties withZonalPlatformFaultDomainAlignMode(ZonalPlatformFaultDomainAlignMode zonalPlatformFaultDomainAlignMode)
      Set the zonalPlatformFaultDomainAlignMode property: Specifies the align mode between Virtual Machine Scale Set compute and storage Fault Domain count.
      Parameters:
      zonalPlatformFaultDomainAlignMode - the zonalPlatformFaultDomainAlignMode value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • skuProfile

      public SkuProfile skuProfile()
      Get the skuProfile property: Specifies the sku profile for the virtual machine scale set.
      Returns:
      the skuProfile value.
    • withSkuProfile

      public VirtualMachineScaleSetProperties withSkuProfile(SkuProfile skuProfile)
      Set the skuProfile property: Specifies the sku profile for the virtual machine scale set.
      Parameters:
      skuProfile - the skuProfile value to set.
      Returns:
      the VirtualMachineScaleSetProperties object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<VirtualMachineScaleSetProperties>
      Throws:
      IOException
    • fromJson

      public static VirtualMachineScaleSetProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VirtualMachineScaleSetProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VirtualMachineScaleSetProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the VirtualMachineScaleSetProperties.