VirtualMachineConfiguration Class
- java.
lang. Object - com.
azure. compute. batch. models. VirtualMachineConfiguration
- com.
Implements
public final class VirtualMachineConfiguration
implements JsonSerializable<VirtualMachineConfiguration>
The configuration for Compute Nodes in a Pool based on the Azure Virtual Machines infrastructure.
Constructor Summary
| Constructor | Description |
|---|---|
| VirtualMachineConfiguration(BatchVmImageReference imageReference, String nodeAgentSkuId) |
Creates an instance of Virtual |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Virtual |
fromJson(JsonReader jsonReader)
Reads an instance of Virtual |
|
Batch |
getContainerConfiguration()
Get the container |
|
List<Data |
getDataDisks()
Get the data |
|
Disk |
getDiskEncryptionConfiguration()
Get the disk |
| List<VMExtension> |
getExtensions()
Get the extensions property: The virtual machine extension for the pool. |
|
Batch |
getImageReference()
Get the image |
| String |
getLicenseType()
Get the license |
| String |
getNodeAgentSkuId()
Get the node |
|
Batch |
getNodePlacementConfiguration()
Get the node |
|
Batch |
getOsDisk()
Get the os |
|
Security |
getSecurityProfile()
Get the security |
|
Service |
getServiceArtifactReference()
Get the service |
|
Windows |
getWindowsConfiguration()
Get the windows |
|
Virtual |
setContainerConfiguration(BatchContainerConfiguration containerConfiguration)
Set the container |
|
Virtual |
setDataDisks(List<DataDisk> dataDisks)
Set the data |
|
Virtual |
setDiskEncryptionConfiguration(DiskEncryptionConfiguration diskEncryptionConfiguration)
Set the disk |
|
Virtual |
setExtensions(List<VMExtension> extensions)
Set the extensions property: The virtual machine extension for the pool. |
|
Virtual |
setLicenseType(String licenseType)
Set the license |
|
Virtual |
setNodePlacementConfiguration(BatchNodePlacementConfiguration nodePlacementConfiguration)
Set the node |
|
Virtual |
setOsDisk(BatchOsDisk osDisk)
Set the os |
|
Virtual |
setSecurityProfile(SecurityProfile securityProfile)
Set the security |
|
Virtual |
setServiceArtifactReference(ServiceArtifactReference serviceArtifactReference)
Set the service |
|
Virtual |
setWindowsConfiguration(WindowsConfiguration windowsConfiguration)
Set the windows |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
VirtualMachineConfiguration
public VirtualMachineConfiguration(BatchVmImageReference imageReference, String nodeAgentSkuId)
Creates an instance of VirtualMachineConfiguration class.
Parameters:
Method Details
fromJson
public static VirtualMachineConfiguration fromJson(JsonReader jsonReader)
Reads an instance of VirtualMachineConfiguration from the JsonReader.
Parameters:
Returns:
Throws:
getContainerConfiguration
public BatchContainerConfiguration 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:
getDataDisks
public List<DataDisk> 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:
getDiskEncryptionConfiguration
public DiskEncryptionConfiguration 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:
getExtensions
public List<VMExtension> 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:
getImageReference
public BatchVmImageReference getImageReference()
Get the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.
Returns:
getLicenseType
public String 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:
getNodeAgentSkuId
public String 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:
getNodePlacementConfiguration
public BatchNodePlacementConfiguration 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:
getOsDisk
public BatchOsDisk getOsDisk()
Get the osDisk property: Settings for the operating system disk of the Virtual Machine.
Returns:
getSecurityProfile
public SecurityProfile getSecurityProfile()
Get the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.
Returns:
getServiceArtifactReference
public ServiceArtifactReference 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:
getWindowsConfiguration
public WindowsConfiguration 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:
setContainerConfiguration
public VirtualMachineConfiguration setContainerConfiguration(BatchContainerConfiguration 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:
Returns:
setDataDisks
public VirtualMachineConfiguration setDataDisks(List<DataDisk> dataDisks)
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:
Returns:
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:
Returns:
setExtensions
public VirtualMachineConfiguration setExtensions(List<VMExtension> extensions)
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:
Returns:
setLicenseType
public VirtualMachineConfiguration 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. 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:
Returns:
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:
Returns:
setOsDisk
public VirtualMachineConfiguration setOsDisk(BatchOsDisk osDisk)
Set the osDisk property: Settings for the operating system disk of the Virtual Machine.
Parameters:
Returns:
setSecurityProfile
public VirtualMachineConfiguration setSecurityProfile(SecurityProfile securityProfile)
Set the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.
Parameters:
Returns:
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:
Returns:
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:
Returns: