VirtualMachineConfiguration Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.VirtualMachineConfiguration

public class VirtualMachineConfiguration

The configuration for Compute Nodes in a Pool based on the Azure Virtual Machines infrastructure.

Constructor Summary

Constructor Description
VirtualMachineConfiguration()

Method Summary

Modifier and Type Method and Description
ContainerConfiguration containerConfiguration()

Get if specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers.

List<DataDisk> dataDisks()

Get this property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them.

DiskEncryptionConfiguration diskEncryptionConfiguration()

Get if specified, encryption is performed on each node in the pool during node provisioning.

List<VMExtension> extensions()

Get if specified, the extensions mentioned in this configuration will be installed on each node.

ImageReference imageReference()

Get the imageReference value.

String licenseType()

Get 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.

String nodeAgentSKUId()

Get 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.

NodePlacementConfiguration nodePlacementConfiguration()

Get this configuration will specify rules on how nodes in the pool will be physically allocated.

OSDisk osDisk()

Get the osDisk value.

SecurityProfile securityProfile()

Get the securityProfile value.

ServiceArtifactReference serviceArtifactReference()

Get the service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.

WindowsConfiguration windowsConfiguration()

Get this property must not be specified if the imageReference property specifies a Linux OS Image.

VirtualMachineConfiguration withContainerConfiguration(ContainerConfiguration containerConfiguration)

Set if specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers.

VirtualMachineConfiguration withDataDisks(List<DataDisk> dataDisks)

Set this property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them.

VirtualMachineConfiguration withDiskEncryptionConfiguration(DiskEncryptionConfiguration diskEncryptionConfiguration)

Set if specified, encryption is performed on each node in the pool during node provisioning.

VirtualMachineConfiguration withExtensions(List<VMExtension> extensions)

Set if specified, the extensions mentioned in this configuration will be installed on each node.

VirtualMachineConfiguration withImageReference(ImageReference imageReference)

Set the imageReference value.

VirtualMachineConfiguration withLicenseType(String licenseType)

Set 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.

VirtualMachineConfiguration withNodeAgentSKUId(String nodeAgentSKUId)

Set 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.

VirtualMachineConfiguration withNodePlacementConfiguration(NodePlacementConfiguration nodePlacementConfiguration)

Set this configuration will specify rules on how nodes in the pool will be physically allocated.

VirtualMachineConfiguration withOsDisk(OSDisk osDisk)

Set the osDisk value.

VirtualMachineConfiguration withSecurityProfile(SecurityProfile securityProfile)

Set the securityProfile value.

VirtualMachineConfiguration withServiceArtifactReference(ServiceArtifactReference serviceArtifactReference)

Set the service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}.

VirtualMachineConfiguration withWindowsConfiguration(WindowsConfiguration windowsConfiguration)

Set this property must not be specified if the imageReference property specifies a Linux OS Image.

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineConfiguration

public VirtualMachineConfiguration()

Method Details

containerConfiguration

public ContainerConfiguration containerConfiguration()

Get 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

dataDisks

public List dataDisks()

Get 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://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk\#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps\#add-an-empty-data-disk-to-a-virtual-machine.

Returns:

the dataDisks value

diskEncryptionConfiguration

public DiskEncryptionConfiguration diskEncryptionConfiguration()

Get if specified, encryption is performed on each node in the pool during node provisioning.

Returns:

the diskEncryptionConfiguration value

extensions

public List extensions()

Get if specified, the extensions mentioned in this configuration will be installed on each node.

Returns:

the extensions value

imageReference

public ImageReference imageReference()

Get the imageReference value.

Returns:

the imageReference value

licenseType

public String licenseType()

Get 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

nodeAgentSKUId

public String nodeAgentSKUId()

Get 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

nodePlacementConfiguration

public NodePlacementConfiguration nodePlacementConfiguration()

Get this configuration will specify rules on how nodes in the pool will be physically allocated.

Returns:

the nodePlacementConfiguration value

osDisk

public OSDisk osDisk()

Get the osDisk value.

Returns:

the osDisk value

securityProfile

public SecurityProfile securityProfile()

Get the securityProfile value.

Returns:

the securityProfile value

serviceArtifactReference

public ServiceArtifactReference serviceArtifactReference()

Get 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

windowsConfiguration

public WindowsConfiguration windowsConfiguration()

Get this property must not be specified if the imageReference property specifies a Linux OS Image.

Returns:

the windowsConfiguration value

withContainerConfiguration

public VirtualMachineConfiguration withContainerConfiguration(ContainerConfiguration containerConfiguration)

Set 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.

withDataDisks

public VirtualMachineConfiguration withDataDisks(List dataDisks)

Set 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://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk\#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/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.

withDiskEncryptionConfiguration

public VirtualMachineConfiguration withDiskEncryptionConfiguration(DiskEncryptionConfiguration diskEncryptionConfiguration)

Set 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.

withExtensions

public VirtualMachineConfiguration withExtensions(List extensions)

Set 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.

withImageReference

public VirtualMachineConfiguration withImageReference(ImageReference imageReference)

Set the imageReference value.

Parameters:

imageReference - the imageReference value to set

Returns:

the VirtualMachineConfiguration object itself.

withLicenseType

public VirtualMachineConfiguration withLicenseType(String licenseType)

Set 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.

withNodeAgentSKUId

public VirtualMachineConfiguration withNodeAgentSKUId(String nodeAgentSKUId)

Set 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.

Parameters:

nodeAgentSKUId - the nodeAgentSKUId value to set

Returns:

the VirtualMachineConfiguration object itself.

withNodePlacementConfiguration

public VirtualMachineConfiguration withNodePlacementConfiguration(NodePlacementConfiguration nodePlacementConfiguration)

Set 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.

withOsDisk

public VirtualMachineConfiguration withOsDisk(OSDisk osDisk)

Set the osDisk value.

Parameters:

osDisk - the osDisk value to set

Returns:

the VirtualMachineConfiguration object itself.

withSecurityProfile

public VirtualMachineConfiguration withSecurityProfile(SecurityProfile securityProfile)

Set the securityProfile value.

Parameters:

securityProfile - the securityProfile value to set

Returns:

the VirtualMachineConfiguration object itself.

withServiceArtifactReference

public VirtualMachineConfiguration withServiceArtifactReference(ServiceArtifactReference serviceArtifactReference)

Set 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.

withWindowsConfiguration

public VirtualMachineConfiguration withWindowsConfiguration(WindowsConfiguration windowsConfiguration)

Set 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.

Applies to