Class VirtualMachinePropertiesInner


  • public final class VirtualMachinePropertiesInner
    extends Object
    Describes the properties of a Virtual Machine.
    • Constructor Detail

      • VirtualMachinePropertiesInner

        public VirtualMachinePropertiesInner()
    • Method Detail

      • hardwareProfile

        public HardwareProfile hardwareProfile()
        Get the hardwareProfile property: Specifies the hardware settings for the virtual machine.
        Returns:
        the hardwareProfile value.
      • withHardwareProfile

        public VirtualMachinePropertiesInner withHardwareProfile​(HardwareProfile hardwareProfile)
        Set the hardwareProfile property: Specifies the hardware settings for the virtual machine.
        Parameters:
        hardwareProfile - the hardwareProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • storageProfile

        public StorageProfile storageProfile()
        Get the storageProfile property: Specifies the storage settings for the virtual machine disks.
        Returns:
        the storageProfile value.
      • withStorageProfile

        public VirtualMachinePropertiesInner withStorageProfile​(StorageProfile storageProfile)
        Set the storageProfile property: Specifies the storage settings for the virtual machine disks.
        Parameters:
        storageProfile - the storageProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • additionalCapabilities

        public AdditionalCapabilities additionalCapabilities()
        Get the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine.
        Returns:
        the additionalCapabilities value.
      • withAdditionalCapabilities

        public VirtualMachinePropertiesInner withAdditionalCapabilities​(AdditionalCapabilities additionalCapabilities)
        Set the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine.
        Parameters:
        additionalCapabilities - the additionalCapabilities value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • osProfile

        public OSProfile osProfile()
        Get the osProfile property: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
        Returns:
        the osProfile value.
      • withOsProfile

        public VirtualMachinePropertiesInner withOsProfile​(OSProfile osProfile)
        Set the osProfile property: Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
        Parameters:
        osProfile - the osProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • networkProfile

        public NetworkProfile networkProfile()
        Get the networkProfile property: Specifies the network interfaces of the virtual machine.
        Returns:
        the networkProfile value.
      • withNetworkProfile

        public VirtualMachinePropertiesInner withNetworkProfile​(NetworkProfile networkProfile)
        Set the networkProfile property: Specifies the network interfaces of the virtual machine.
        Parameters:
        networkProfile - the networkProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • securityProfile

        public SecurityProfile securityProfile()
        Get the securityProfile property: Specifies the Security related profile settings for the virtual machine.
        Returns:
        the securityProfile value.
      • withSecurityProfile

        public VirtualMachinePropertiesInner withSecurityProfile​(SecurityProfile securityProfile)
        Set the securityProfile property: Specifies the Security related profile settings for the virtual machine.
        Parameters:
        securityProfile - the securityProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • diagnosticsProfile

        public DiagnosticsProfile diagnosticsProfile()
        Get the diagnosticsProfile property: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
        Returns:
        the diagnosticsProfile value.
      • withDiagnosticsProfile

        public VirtualMachinePropertiesInner withDiagnosticsProfile​(DiagnosticsProfile diagnosticsProfile)
        Set the diagnosticsProfile property: Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
        Parameters:
        diagnosticsProfile - the diagnosticsProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • availabilitySet

        public com.azure.core.management.SubResource availabilitySet()
        Get the availabilitySet property: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
        Returns:
        the availabilitySet value.
      • withAvailabilitySet

        public VirtualMachinePropertiesInner withAvailabilitySet​(com.azure.core.management.SubResource availabilitySet)
        Set the availabilitySet property: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). <br><br> For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
        Parameters:
        availabilitySet - the availabilitySet value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • virtualMachineScaleSet

        public com.azure.core.management.SubResource virtualMachineScaleSet()
        Get the virtualMachineScaleSet property: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01.
        Returns:
        the virtualMachineScaleSet value.
      • withVirtualMachineScaleSet

        public VirtualMachinePropertiesInner withVirtualMachineScaleSet​(com.azure.core.management.SubResource virtualMachineScaleSet)
        Set the virtualMachineScaleSet property: Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01.
        Parameters:
        virtualMachineScaleSet - the virtualMachineScaleSet value to set.
        Returns:
        the VirtualMachinePropertiesInner 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 should be assigned to. <br><br>Minimum api-version: 2018-04-01.
        Returns:
        the proximityPlacementGroup value.
      • withProximityPlacementGroup

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

        public VirtualMachinePriorityTypes priority()
        Get the priority property: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01.
        Returns:
        the priority value.
      • withPriority

        public VirtualMachinePropertiesInner withPriority​(VirtualMachinePriorityTypes priority)
        Set the priority property: Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01.
        Parameters:
        priority - the priority value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • evictionPolicy

        public VirtualMachineEvictionPolicyTypes evictionPolicy()
        Get the evictionPolicy property: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
        Returns:
        the evictionPolicy value.
      • withEvictionPolicy

        public VirtualMachinePropertiesInner withEvictionPolicy​(VirtualMachineEvictionPolicyTypes evictionPolicy)
        Set the evictionPolicy property: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
        Parameters:
        evictionPolicy - the evictionPolicy value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • billingProfile

        public BillingProfile billingProfile()
        Get the billingProfile property: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
        Returns:
        the billingProfile value.
      • withBillingProfile

        public VirtualMachinePropertiesInner withBillingProfile​(BillingProfile billingProfile)
        Set the billingProfile property: Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
        Parameters:
        billingProfile - the billingProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • host

        public com.azure.core.management.SubResource host()
        Get the host property: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
        Returns:
        the host value.
      • withHost

        public VirtualMachinePropertiesInner withHost​(com.azure.core.management.SubResource host)
        Set the host property: Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
        Parameters:
        host - the host value to set.
        Returns:
        the VirtualMachinePropertiesInner 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 resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties.
        Returns:
        the hostGroup value.
      • withHostGroup

        public VirtualMachinePropertiesInner withHostGroup​(com.azure.core.management.SubResource hostGroup)
        Set the hostGroup property: Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties.
        Parameters:
        hostGroup - the hostGroup value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • provisioningState

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

        public VirtualMachineInstanceViewInner instanceView()
        Get the instanceView property: The virtual machine instance view.
        Returns:
        the instanceView value.
      • licenseType

        public String licenseType()
        Get the licenseType property: Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15.
        Returns:
        the licenseType value.
      • withLicenseType

        public VirtualMachinePropertiesInner withLicenseType​(String licenseType)
        Set the licenseType property: Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15.
        Parameters:
        licenseType - the licenseType value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • vmId

        public String vmId()
        Get the vmId property: Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.
        Returns:
        the vmId value.
      • extensionsTimeBudget

        public String extensionsTimeBudget()
        Get the extensionsTimeBudget property: Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01.
        Returns:
        the extensionsTimeBudget value.
      • withExtensionsTimeBudget

        public VirtualMachinePropertiesInner withExtensionsTimeBudget​(String extensionsTimeBudget)
        Set the extensionsTimeBudget property: Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01.
        Parameters:
        extensionsTimeBudget - the extensionsTimeBudget value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • platformFaultDomain

        public Integer platformFaultDomain()
        Get the platformFaultDomain property: Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01.
        Returns:
        the platformFaultDomain value.
      • withPlatformFaultDomain

        public VirtualMachinePropertiesInner withPlatformFaultDomain​(Integer platformFaultDomain)
        Set the platformFaultDomain property: Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01.
        Parameters:
        platformFaultDomain - the platformFaultDomain value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • scheduledEventsProfile

        public ScheduledEventsProfile scheduledEventsProfile()
        Get the scheduledEventsProfile property: Specifies Scheduled Event related configurations.
        Returns:
        the scheduledEventsProfile value.
      • withScheduledEventsProfile

        public VirtualMachinePropertiesInner withScheduledEventsProfile​(ScheduledEventsProfile scheduledEventsProfile)
        Set the scheduledEventsProfile property: Specifies Scheduled Event related configurations.
        Parameters:
        scheduledEventsProfile - the scheduledEventsProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • userData

        public String userData()
        Get the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01.
        Returns:
        the userData value.
      • withUserData

        public VirtualMachinePropertiesInner withUserData​(String userData)
        Set the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01.
        Parameters:
        userData - the userData value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • capacityReservation

        public CapacityReservationProfile capacityReservation()
        Get the capacityReservation property: Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01.
        Returns:
        the capacityReservation value.
      • withCapacityReservation

        public VirtualMachinePropertiesInner withCapacityReservation​(CapacityReservationProfile capacityReservation)
        Set the capacityReservation property: Specifies information about the capacity reservation that is used to allocate virtual machine. <br><br>Minimum api-version: 2021-04-01.
        Parameters:
        capacityReservation - the capacityReservation value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • applicationProfile

        public ApplicationProfile applicationProfile()
        Get the applicationProfile property: Specifies the gallery applications that should be made available to the VM/VMSS.
        Returns:
        the applicationProfile value.
      • withApplicationProfile

        public VirtualMachinePropertiesInner withApplicationProfile​(ApplicationProfile applicationProfile)
        Set the applicationProfile property: Specifies the gallery applications that should be made available to the VM/VMSS.
        Parameters:
        applicationProfile - the applicationProfile value to set.
        Returns:
        the VirtualMachinePropertiesInner object itself.
      • timeCreated

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

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