Class VirtualMachineConfiguration
-
Constructor Summary
ConstructorDescriptionCreates an instance of VirtualMachineConfiguration class. -
Method Summary
Modifier and TypeMethodDescriptionGet the containerConfiguration property: The configuration for container-enabled pools.Get the dataDisks property: The configuration for data disks attached to the compute nodes in the pool.Get the diskEncryptionConfiguration property: If specified, encryption is performed on each node in the pool during node provisioning.Get the extensions property: The virtual machine extension for the pool.Get the imageReference property: A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine.Get the licenseType property: The type of on-premises license to be used when deploying the operating system.Get the nodeAgentSkuId property: The SKU of the Batch node agent to be provisioned on compute nodes in the pool.Get the nodePlacementConfiguration property: Node placement configuration for batch pools.osDisk()
Get the osDisk property: Settings for the operating system disk of the virtual machine.void
validate()
Validates the instance.Get the windowsConfiguration property: Windows operating system settings to apply to the virtual machine.withContainerConfiguration
(ContainerConfiguration containerConfiguration) Set the containerConfiguration property: The configuration for container-enabled pools.withDataDisks
(List<DataDisk> dataDisks) Set the dataDisks property: The configuration for data disks attached to the compute nodes in the pool.withDiskEncryptionConfiguration
(DiskEncryptionConfiguration diskEncryptionConfiguration) Set the diskEncryptionConfiguration property: If specified, encryption is performed on each node in the pool during node provisioning.withExtensions
(List<VMExtension> extensions) Set the extensions property: The virtual machine extension for the pool.withImageReference
(ImageReference imageReference) Set the imageReference property: A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine.withLicenseType
(String licenseType) Set the licenseType property: The type of on-premises license to be used when deploying the operating system.withNodeAgentSkuId
(String nodeAgentSkuId) Set the nodeAgentSkuId property: The SKU of the Batch node agent to be provisioned on compute nodes in the pool.withNodePlacementConfiguration
(NodePlacementConfiguration nodePlacementConfiguration) Set the nodePlacementConfiguration property: Node placement configuration for batch pools.withOsDisk
(OSDisk osDisk) Set the osDisk property: Settings for the operating system disk of the virtual machine.withWindowsConfiguration
(WindowsConfiguration windowsConfiguration) Set the windowsConfiguration property: Windows operating system settings to apply to the virtual machine.
-
Constructor Details
-
VirtualMachineConfiguration
public VirtualMachineConfiguration()Creates an instance of VirtualMachineConfiguration class.
-
-
Method Details
-
imageReference
Get the imageReference property: A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' operation.- Returns:
- the imageReference value.
-
withImageReference
Set the imageReference property: A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' operation.- Parameters:
imageReference
- the imageReference value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
nodeAgentSkuId
Get the nodeAgentSkuId property: The SKU of the Batch node agent to be provisioned on compute nodes in the pool.The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation.
- Returns:
- the nodeAgentSkuId value.
-
withNodeAgentSkuId
Set the nodeAgentSkuId property: The SKU of the Batch node agent to be provisioned on compute nodes in the pool.The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the 'List supported node agent SKUs' operation.
- Parameters:
nodeAgentSkuId
- the nodeAgentSkuId value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
windowsConfiguration
Get the windowsConfiguration property: Windows operating system settings to apply to the virtual machine.This property must not be specified if the imageReference specifies a Linux OS image.
- Returns:
- the windowsConfiguration value.
-
withWindowsConfiguration
public VirtualMachineConfiguration withWindowsConfiguration(WindowsConfiguration windowsConfiguration) Set the windowsConfiguration property: Windows operating system settings to apply to the virtual machine.This property must not be specified if the imageReference specifies a Linux OS image.
- Parameters:
windowsConfiguration
- the windowsConfiguration value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
dataDisks
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.
- Returns:
- the dataDisks value.
-
withDataDisks
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.
- Parameters:
dataDisks
- the dataDisks value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
licenseType
Get the licenseType property: The type of on-premises license to be used when deploying the operating system.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 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.
-
withLicenseType
Set the licenseType property: The type of on-premises license to be used when deploying the operating system.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 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.
-
containerConfiguration
Get the containerConfiguration property: The configuration for container-enabled pools.If specified, setup is performed on each 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.
-
withContainerConfiguration
public VirtualMachineConfiguration withContainerConfiguration(ContainerConfiguration containerConfiguration) Set the containerConfiguration property: The configuration for container-enabled pools.If specified, setup is performed on each 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.
-
diskEncryptionConfiguration
Get the diskEncryptionConfiguration property: If specified, encryption is performed on each node in the pool during node provisioning.- Returns:
- the diskEncryptionConfiguration value.
-
withDiskEncryptionConfiguration
public VirtualMachineConfiguration withDiskEncryptionConfiguration(DiskEncryptionConfiguration diskEncryptionConfiguration) Set the diskEncryptionConfiguration property: 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.
-
nodePlacementConfiguration
Get the nodePlacementConfiguration property: Node placement configuration for batch pools.This configuration will specify rules on how nodes in the pool will be physically allocated.
- Returns:
- the nodePlacementConfiguration value.
-
withNodePlacementConfiguration
public VirtualMachineConfiguration withNodePlacementConfiguration(NodePlacementConfiguration nodePlacementConfiguration) Set the nodePlacementConfiguration property: Node placement configuration for batch pools.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.
-
extensions
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.
-
withExtensions
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.
-
osDisk
Get the osDisk property: Settings for the operating system disk of the virtual machine.Contains configuration for ephemeral OSDisk settings.
- Returns:
- the osDisk value.
-
withOsDisk
Set the osDisk property: Settings for the operating system disk of the virtual machine.Contains configuration for ephemeral OSDisk settings.
- Parameters:
osDisk
- the osDisk value to set.- Returns:
- the VirtualMachineConfiguration object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-