VirtualMachineInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. core. management. Resource - com.
azure. resourcemanager. compute. fluent. models. VirtualMachineInner
- com.
- com.
- com.
public final class VirtualMachineInner
extends Resource
Describes a Virtual Machine.
Constructor Summary
Constructor | Description |
---|---|
VirtualMachineInner() |
Creates an instance of Virtual |
Method Summary
Modifier and Type | Method and Description |
---|---|
Additional |
additionalCapabilities()
Get the additional |
Application |
applicationProfile()
Get the application |
Sub |
availabilitySet()
Get the availability |
Billing |
billingProfile()
Get the billing |
Capacity |
capacityReservation()
Get the capacity |
Diagnostics |
diagnosticsProfile()
Get the diagnostics |
String |
etag()
Get the etag property: Etag is property returned in Create/Update/Get response of the VM, so that customer can supply it in the header to ensure optimistic updates. |
Virtual |
evictionPolicy()
Get the eviction |
Extended |
extendedLocation()
Get the extended |
String |
extensionsTimeBudget()
Get the extensions |
static
Virtual |
fromJson(JsonReader jsonReader)
Reads an instance of Virtual |
Hardware |
hardwareProfile()
Get the hardware |
Sub |
host()
Get the host property: Specifies information about the dedicated host that the virtual machine resides in. |
Sub |
hostGroup()
Get the host |
String |
id()
Get the id property: Fully qualified resource Id for the resource. |
Virtual |
identity()
Get the identity property: The identity of the virtual machine, if configured. |
Virtual |
instanceView()
Get the instance |
String |
licenseType()
Get the license |
String |
managedBy()
Get the managed |
String |
name()
Get the name property: The name of the resource. |
Network |
networkProfile()
Get the network |
OSProfile |
osProfile()
Get the os |
Plan |
plan()
Get the plan property: Specifies information about the marketplace image used to create the virtual machine. |
Integer |
platformFaultDomain()
Get the platform |
Virtual |
priority()
Get the priority property: Specifies the priority for the virtual machine. |
String |
provisioningState()
Get the provisioning |
Sub |
proximityPlacementGroup()
Get the proximity |
List<Virtual |
resources()
Get the resources property: The virtual machine child extension resources. |
Scheduled |
scheduledEventsPolicy()
Get the scheduled |
Scheduled |
scheduledEventsProfile()
Get the scheduled |
Security |
securityProfile()
Get the security |
Storage |
storageProfile()
Get the storage |
Offset |
timeCreated()
Get the time |
Json |
toJson(JsonWriter jsonWriter) |
String |
type()
Get the type property: The type of the resource. |
String |
userData()
Get the user |
void |
validate()
Validates the instance. |
Sub |
virtualMachineScaleSet()
Get the virtual |
String |
vmId()
Get the vm |
Virtual |
withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities)
Set the additional |
Virtual |
withApplicationProfile(ApplicationProfile applicationProfile)
Set the application |
Virtual |
withAvailabilitySet(SubResource availabilitySet)
Set the availability |
Virtual |
withBillingProfile(BillingProfile billingProfile)
Set the billing |
Virtual |
withCapacityReservation(CapacityReservationProfile capacityReservation)
Set the capacity |
Virtual |
withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile)
Set the diagnostics |
Virtual |
withEvictionPolicy(VirtualMachineEvictionPolicyTypes evictionPolicy)
Set the eviction |
Virtual |
withExtendedLocation(ExtendedLocation extendedLocation)
Set the extended |
Virtual |
withExtensionsTimeBudget(String extensionsTimeBudget)
Set the extensions |
Virtual |
withHardwareProfile(HardwareProfile hardwareProfile)
Set the hardware |
Virtual |
withHost(SubResource host)
Set the host property: Specifies information about the dedicated host that the virtual machine resides in. |
Virtual |
withHostGroup(SubResource hostGroup)
Set the host |
Virtual |
withIdentity(VirtualMachineIdentity identity)
Set the identity property: The identity of the virtual machine, if configured. |
Virtual |
withLicenseType(String licenseType)
Set the license |
Virtual |
withLocation(String location) |
Virtual |
withNetworkProfile(NetworkProfile networkProfile)
Set the network |
Virtual |
withOsProfile(OSProfile osProfile)
Set the os |
Virtual |
withPlan(Plan plan)
Set the plan property: Specifies information about the marketplace image used to create the virtual machine. |
Virtual |
withPlatformFaultDomain(Integer platformFaultDomain)
Set the platform |
Virtual |
withPriority(VirtualMachinePriorityTypes priority)
Set the priority property: Specifies the priority for the virtual machine. |
Virtual |
withProximityPlacementGroup(SubResource proximityPlacementGroup)
Set the proximity |
Virtual |
withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy)
Set the scheduled |
Virtual |
withScheduledEventsProfile(ScheduledEventsProfile scheduledEventsProfile)
Set the scheduled |
Virtual |
withSecurityProfile(SecurityProfile securityProfile)
Set the security |
Virtual |
withStorageProfile(StorageProfile storageProfile)
Set the storage |
Virtual |
withTags(Map<String,String> tags) |
Virtual |
withUserData(String userData)
Set the user |
Virtual |
withVirtualMachineScaleSet(SubResource virtualMachineScaleSet)
Set the virtual |
Virtual |
withZones(List<String> zones)
Set the zones property: The virtual machine zones. |
List<String> |
zones()
Get the zones property: The virtual machine zones. |
Methods inherited from ProxyResource
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
VirtualMachineInner
public VirtualMachineInner()
Creates an instance of VirtualMachineInner class.
Method Details
additionalCapabilities
public AdditionalCapabilities additionalCapabilities()
Get the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine.
Returns:
applicationProfile
public ApplicationProfile applicationProfile()
Get the applicationProfile property: Specifies the gallery applications that should be made available to the VM/VMSS.
Returns:
availabilitySet
public 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). 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). 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. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
Returns:
billingProfile
public BillingProfile billingProfile()
Get the billingProfile property: Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
Returns:
capacityReservation
public CapacityReservationProfile capacityReservation()
Get the capacityReservation property: Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
Returns:
diagnosticsProfile
public DiagnosticsProfile diagnosticsProfile()
Get the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
Returns:
etag
public String etag()
Get the etag property: Etag is property returned in Create/Update/Get response of the VM, so that customer can supply it in the header to ensure optimistic updates.
Returns:
evictionPolicy
public VirtualMachineEvictionPolicyTypes evictionPolicy()
Get the evictionPolicy property: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
Returns:
extendedLocation
public ExtendedLocation extendedLocation()
Get the extendedLocation property: The extended location of the Virtual Machine.
Returns:
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). Minimum api-version: 2020-06-01.
Returns:
fromJson
public static VirtualMachineInner fromJson(JsonReader jsonReader)
Reads an instance of VirtualMachineInner from the JsonReader.
Parameters:
Returns:
Throws:
hardwareProfile
public HardwareProfile hardwareProfile()
Get the hardwareProfile property: Specifies the hardware settings for the virtual machine.
Returns:
host
public SubResource host()
Get the host property: Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
Returns:
hostGroup
public SubResource hostGroup()
Get the hostGroup property: Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.
Returns:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
VirtualMachineInner.id()Returns:
identity
public VirtualMachineIdentity identity()
Get the identity property: The identity of the virtual machine, if configured.
Returns:
instanceView
public VirtualMachineInstanceViewInner instanceView()
Get the instanceView property: The virtual machine instance view.
Returns:
licenseType
public String licenseType()
Get the licenseType property: Specifies that the image or disk that is being used was licensed on-premises.
Possible values for Windows Server operating system are:
Windows_Client
Windows_Server
Possible values for Linux Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS (for SUSE)
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
Minimum api-version: 2015-06-15.
Returns:
managedBy
public String managedBy()
Get the managedBy property: ManagedBy is set to Virtual Machine Scale Set(VMSS) flex ARM resourceID, if the VM is part of the VMSS. This property is used by platform for internal resource group delete optimization.
Returns:
name
public String name()
Get the name property: The name of the resource.
Overrides:
VirtualMachineInner.name()Returns:
networkProfile
public NetworkProfile networkProfile()
Get the networkProfile property: Specifies the network interfaces of the virtual machine.
Returns:
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:
plan
public Plan plan()
Get the plan property: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
Returns:
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. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api\u2010version: 2020\u201012\u201001.
Returns:
priority
public VirtualMachinePriorityTypes priority()
Get the priority property: Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01.
Returns:
provisioningState
public String provisioningState()
Get the provisioningState property: The provisioning state, which only appears in the response.
Returns:
proximityPlacementGroup
public SubResource proximityPlacementGroup()
Get the proximityPlacementGroup property: Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
Returns:
resources
public List
Get the resources property: The virtual machine child extension resources.
Returns:
scheduledEventsPolicy
public ScheduledEventsPolicy scheduledEventsPolicy()
Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the virtual machine.
Returns:
scheduledEventsProfile
public ScheduledEventsProfile scheduledEventsProfile()
Get the scheduledEventsProfile property: Specifies Scheduled Event related configurations.
Returns:
securityProfile
public SecurityProfile securityProfile()
Get the securityProfile property: Specifies the Security related profile settings for the virtual machine.
Returns:
storageProfile
public StorageProfile storageProfile()
Get the storageProfile property: Specifies the storage settings for the virtual machine disks.
Returns:
timeCreated
public OffsetDateTime timeCreated()
Get the timeCreated property: Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
VirtualMachineInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
VirtualMachineInner.type()Returns:
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. Minimum api-version: 2021-03-01.
Returns:
validate
public void validate()
Validates the instance.
virtualMachineScaleSet
public 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. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api\u2010version: 2019\u201003\u201001.
Returns:
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:
withAdditionalCapabilities
public VirtualMachineInner withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities)
Set the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine.
Parameters:
Returns:
withApplicationProfile
public VirtualMachineInner withApplicationProfile(ApplicationProfile applicationProfile)
Set the applicationProfile property: Specifies the gallery applications that should be made available to the VM/VMSS.
Parameters:
Returns:
withAvailabilitySet
public VirtualMachineInner withAvailabilitySet(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). 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). 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. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
Parameters:
Returns:
withBillingProfile
public VirtualMachineInner withBillingProfile(BillingProfile billingProfile)
Set the billingProfile property: Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.
Parameters:
Returns:
withCapacityReservation
public VirtualMachineInner withCapacityReservation(CapacityReservationProfile capacityReservation)
Set the capacityReservation property: Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.
Parameters:
Returns:
withDiagnosticsProfile
public VirtualMachineInner withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile)
Set the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
Parameters:
Returns:
withEvictionPolicy
public VirtualMachineInner withEvictionPolicy(VirtualMachineEvictionPolicyTypes evictionPolicy)
Set the evictionPolicy property: Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
Parameters:
Returns:
withExtendedLocation
public VirtualMachineInner withExtendedLocation(ExtendedLocation extendedLocation)
Set the extendedLocation property: The extended location of the Virtual Machine.
Parameters:
Returns:
withExtensionsTimeBudget
public VirtualMachineInner 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). Minimum api-version: 2020-06-01.
Parameters:
Returns:
withHardwareProfile
public VirtualMachineInner withHardwareProfile(HardwareProfile hardwareProfile)
Set the hardwareProfile property: Specifies the hardware settings for the virtual machine.
Parameters:
Returns:
withHost
public VirtualMachineInner withHost(SubResource host)
Set the host property: Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.
Parameters:
Returns:
withHostGroup
public VirtualMachineInner withHostGroup(SubResource hostGroup)
Set the hostGroup property: Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.
Parameters:
Returns:
withIdentity
public VirtualMachineInner withIdentity(VirtualMachineIdentity identity)
Set the identity property: The identity of the virtual machine, if configured.
Parameters:
Returns:
withLicenseType
public VirtualMachineInner withLicenseType(String licenseType)
Set the licenseType property: Specifies that the image or disk that is being used was licensed on-premises.
Possible values for Windows Server operating system are:
Windows_Client
Windows_Server
Possible values for Linux Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS (for SUSE)
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
Minimum api-version: 2015-06-15.
Parameters:
Returns:
withLocation
public VirtualMachineInner withLocation(String location)
Overrides:
VirtualMachineInner.withLocation(String location)Parameters:
withNetworkProfile
public VirtualMachineInner withNetworkProfile(NetworkProfile networkProfile)
Set the networkProfile property: Specifies the network interfaces of the virtual machine.
Parameters:
Returns:
withOsProfile
public VirtualMachineInner 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:
Returns:
withPlan
public VirtualMachineInner withPlan(Plan plan)
Set the plan property: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
Parameters:
Returns:
withPlatformFaultDomain
public VirtualMachineInner 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. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api\u2010version: 2020\u201012\u201001.
Parameters:
Returns:
withPriority
public VirtualMachineInner withPriority(VirtualMachinePriorityTypes priority)
Set the priority property: Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01.
Parameters:
Returns:
withProximityPlacementGroup
public VirtualMachineInner withProximityPlacementGroup(SubResource proximityPlacementGroup)
Set the proximityPlacementGroup property: Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.
Parameters:
Returns:
withScheduledEventsPolicy
public VirtualMachineInner withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy)
Set the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the virtual machine.
Parameters:
Returns:
withScheduledEventsProfile
public VirtualMachineInner withScheduledEventsProfile(ScheduledEventsProfile scheduledEventsProfile)
Set the scheduledEventsProfile property: Specifies Scheduled Event related configurations.
Parameters:
Returns:
withSecurityProfile
public VirtualMachineInner withSecurityProfile(SecurityProfile securityProfile)
Set the securityProfile property: Specifies the Security related profile settings for the virtual machine.
Parameters:
Returns:
withStorageProfile
public VirtualMachineInner withStorageProfile(StorageProfile storageProfile)
Set the storageProfile property: Specifies the storage settings for the virtual machine disks.
Parameters:
Returns:
withTags
public VirtualMachineInner withTags(Map
Overrides:
VirtualMachineInner.withTags(Map<String,String> tags)Parameters:
withUserData
public VirtualMachineInner 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. Minimum api-version: 2021-03-01.
Parameters:
Returns:
withVirtualMachineScaleSet
public VirtualMachineInner withVirtualMachineScaleSet(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. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api\u2010version: 2019\u201003\u201001.
Parameters:
Returns:
withZones
public VirtualMachineInner withZones(List
Set the zones property: The virtual machine zones.
Parameters:
Returns:
zones
public List
Get the zones property: The virtual machine zones.
Returns: