Package com.azure.compute.batch.models
Class VirtualMachineConfiguration
java.lang.Object
com.azure.compute.batch.models.VirtualMachineConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualMachineConfiguration>
public final class VirtualMachineConfiguration
extends Object
implements com.azure.json.JsonSerializable<VirtualMachineConfiguration>
The configuration for Compute Nodes in a Pool based on the Azure Virtual
Machines infrastructure.
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualMachineConfiguration
(ImageReference imageReference, String nodeAgentSkuId) Creates an instance of VirtualMachineConfiguration class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VirtualMachineConfiguration
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of VirtualMachineConfiguration from the JsonReader.Get the containerConfiguration property: The container configuration for the Pool.Get the dataDisks property: The configuration for data disks attached to the Compute Nodes in the Pool.Get the diskEncryptionConfiguration property: The disk encryption configuration for the pool.Get the extensions property: The virtual machine extension for the pool.Get the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.Get the licenseType property: This only applies to Images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the Compute Nodes which will be deployed.Get the nodeAgentSkuId property: The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool.Get the nodePlacementConfiguration property: The node placement configuration for the pool.Get the osDisk property: Settings for the operating system disk of the Virtual Machine.Get the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.Get the serviceArtifactReference property: Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version.Get the windowsConfiguration property: Windows operating system settings on the virtual machine.setContainerConfiguration
(ContainerConfiguration containerConfiguration) Set the containerConfiguration property: The container configuration for the Pool.setDataDisks
(List<DataDisk> dataDisks) Set the dataDisks property: The configuration for data disks attached to the Compute Nodes in the Pool.setDiskEncryptionConfiguration
(DiskEncryptionConfiguration diskEncryptionConfiguration) Set the diskEncryptionConfiguration property: The disk encryption configuration for the pool.setExtensions
(List<VMExtension> extensions) Set the extensions property: The virtual machine extension for the pool.setLicenseType
(String licenseType) Set the licenseType property: This only applies to Images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the Compute Nodes which will be deployed.setNodePlacementConfiguration
(BatchNodePlacementConfiguration nodePlacementConfiguration) Set the nodePlacementConfiguration property: The node placement configuration for the pool.Set the osDisk property: Settings for the operating system disk of the Virtual Machine.setSecurityProfile
(SecurityProfile securityProfile) Set the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.setServiceArtifactReference
(ServiceArtifactReference serviceArtifactReference) Set the serviceArtifactReference property: Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version.setWindowsConfiguration
(WindowsConfiguration windowsConfiguration) Set the windowsConfiguration property: Windows operating system settings on the virtual machine.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VirtualMachineConfiguration
Creates an instance of VirtualMachineConfiguration class.- Parameters:
imageReference
- the imageReference value to set.nodeAgentSkuId
- the nodeAgentSkuId value to set.
-
-
Method Details
-
getImageReference
Get the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.- Returns:
- the imageReference value.
-
getNodeAgentSkuId
Get the nodeAgentSkuId property: The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation.- Returns:
- the nodeAgentSkuId value.
-
getWindowsConfiguration
Get the windowsConfiguration property: Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image.- Returns:
- the windowsConfiguration value.
-
setWindowsConfiguration
public VirtualMachineConfiguration setWindowsConfiguration(WindowsConfiguration windowsConfiguration) Set the windowsConfiguration property: Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image.- Parameters:
windowsConfiguration
- the windowsConfiguration value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getDataDisks
Get the dataDisks property: The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine.- Returns:
- the dataDisks value.
-
setDataDisks
Set the dataDisks property: The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://learn.microsoft.com/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://learn.microsoft.com/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine.- Parameters:
dataDisks
- the dataDisks value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getLicenseType
Get the licenseType property: This only applies to Images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the Compute Nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client.- Returns:
- the licenseType value.
-
setLicenseType
Set the licenseType property: This only applies to Images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the Compute Nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client.- Parameters:
licenseType
- the licenseType value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getContainerConfiguration
Get the containerConfiguration property: The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it.- Returns:
- the containerConfiguration value.
-
setContainerConfiguration
public VirtualMachineConfiguration setContainerConfiguration(ContainerConfiguration containerConfiguration) Set the containerConfiguration property: The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it.- Parameters:
containerConfiguration
- the containerConfiguration value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getDiskEncryptionConfiguration
Get the diskEncryptionConfiguration property: The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning.- Returns:
- the diskEncryptionConfiguration value.
-
setDiskEncryptionConfiguration
public VirtualMachineConfiguration setDiskEncryptionConfiguration(DiskEncryptionConfiguration diskEncryptionConfiguration) Set the diskEncryptionConfiguration property: The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning.- Parameters:
diskEncryptionConfiguration
- the diskEncryptionConfiguration value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getNodePlacementConfiguration
Get the nodePlacementConfiguration property: The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated.- Returns:
- the nodePlacementConfiguration value.
-
setNodePlacementConfiguration
public VirtualMachineConfiguration setNodePlacementConfiguration(BatchNodePlacementConfiguration nodePlacementConfiguration) Set the nodePlacementConfiguration property: The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated.- Parameters:
nodePlacementConfiguration
- the nodePlacementConfiguration value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getExtensions
Get the extensions property: The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node.- Returns:
- the extensions value.
-
setExtensions
Set the extensions property: The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node.- Parameters:
extensions
- the extensions value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getOsDisk
Get the osDisk property: Settings for the operating system disk of the Virtual Machine.- Returns:
- the osDisk value.
-
setOsDisk
Set the osDisk property: Settings for the operating system disk of the Virtual Machine.- Parameters:
osDisk
- the osDisk value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getSecurityProfile
Get the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.- Returns:
- the securityProfile value.
-
setSecurityProfile
Set the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.- Parameters:
securityProfile
- the securityProfile value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
getServiceArtifactReference
Get the serviceArtifactReference property: Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.- Returns:
- the serviceArtifactReference value.
-
setServiceArtifactReference
public VirtualMachineConfiguration setServiceArtifactReference(ServiceArtifactReference serviceArtifactReference) Set the serviceArtifactReference property: Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.- Parameters:
serviceArtifactReference
- the serviceArtifactReference value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<VirtualMachineConfiguration>
- Throws:
IOException
-
fromJson
public static VirtualMachineConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VirtualMachineConfiguration from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of VirtualMachineConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the VirtualMachineConfiguration.
-