VirtualMachineConfiguration Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.models.VirtualMachineConfiguration

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()

Creates an instance of VirtualMachineConfiguration class.

Method Summary

Modifier and Type Method and Description
ContainerConfiguration containerConfiguration()

Get the containerConfiguration property: The container configuration for the pool.

List<DataDisk> dataDisks()

Get the dataDisks property: The configuration for data disks attached to the compute nodes in the pool.

DiskEncryptionConfiguration diskEncryptionConfiguration()

Get the diskEncryptionConfiguration property: The disk encryption configuration for the pool.

List<VMExtension> extensions()

Get the extensions property: The virtual machine extension for the pool.

static VirtualMachineConfiguration fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineConfiguration from the JsonReader.

ImageReference imageReference()

Get the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.

String licenseType()

Get the licenseType property: The type of on-premises license to be used when deploying the operating system.

String nodeAgentSkuId()

Get the nodeAgentSkuId property: The SKU of the Batch node agent to be provisioned on compute nodes in the pool.

NodePlacementConfiguration nodePlacementConfiguration()

Get the nodePlacementConfiguration property: The node placement configuration for the pool.

OSDisk osDisk()

Get the osDisk property: Settings for the operating system disk of the Virtual Machine.

SecurityProfile securityProfile()

Get the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.

ServiceArtifactReference serviceArtifactReference()

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.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

WindowsConfiguration windowsConfiguration()

Get the windowsConfiguration property: Windows operating system settings on the virtual machine.

VirtualMachineConfiguration withContainerConfiguration(ContainerConfiguration containerConfiguration)

Set the containerConfiguration property: The container configuration for the pool.

VirtualMachineConfiguration withDataDisks(List<DataDisk> dataDisks)

Set the dataDisks property: The configuration for data disks attached to the compute nodes in the pool.

VirtualMachineConfiguration withDiskEncryptionConfiguration(DiskEncryptionConfiguration diskEncryptionConfiguration)

Set the diskEncryptionConfiguration property: The disk encryption configuration for the pool.

VirtualMachineConfiguration withExtensions(List<VMExtension> extensions)

Set the extensions property: The virtual machine extension for the pool.

VirtualMachineConfiguration withImageReference(ImageReference imageReference)

Set the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.

VirtualMachineConfiguration withLicenseType(String licenseType)

Set the licenseType property: The type of on-premises license to be used when deploying the operating system.

VirtualMachineConfiguration withNodeAgentSkuId(String nodeAgentSkuId)

Set the nodeAgentSkuId property: The SKU of the Batch node agent to be provisioned on compute nodes in the pool.

VirtualMachineConfiguration withNodePlacementConfiguration(NodePlacementConfiguration nodePlacementConfiguration)

Set the nodePlacementConfiguration property: The node placement configuration for the pool.

VirtualMachineConfiguration withOsDisk(OSDisk osDisk)

Set the osDisk property: Settings for the operating system disk of the Virtual Machine.

VirtualMachineConfiguration withSecurityProfile(SecurityProfile securityProfile)

Set the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.

VirtualMachineConfiguration withServiceArtifactReference(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.

VirtualMachineConfiguration withWindowsConfiguration(WindowsConfiguration windowsConfiguration)

Set the windowsConfiguration property: Windows operating system settings on the virtual machine.

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineConfiguration

public VirtualMachineConfiguration()

Creates an instance of VirtualMachineConfiguration class.

Method Details

containerConfiguration

public ContainerConfiguration containerConfiguration()

Get the containerConfiguration property: The container configuration for the pool. 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.

dataDisks

public List<DataDisk> 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.

diskEncryptionConfiguration

public DiskEncryptionConfiguration diskEncryptionConfiguration()

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.

extensions

public List<VMExtension> 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.

fromJson

public static VirtualMachineConfiguration fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

imageReference

public ImageReference imageReference()

Get the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. 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.

licenseType

public String 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.

nodeAgentSkuId

public String 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.

nodePlacementConfiguration

public NodePlacementConfiguration nodePlacementConfiguration()

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.

osDisk

public OSDisk 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.

securityProfile

public SecurityProfile securityProfile()

Get the securityProfile property: Specifies the security profile settings for the virtual machine or virtual machine scale set.

Returns:

the securityProfile value.

serviceArtifactReference

public ServiceArtifactReference serviceArtifactReference()

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

windowsConfiguration

public WindowsConfiguration windowsConfiguration()

Get the windowsConfiguration property: Windows operating system settings on the virtual machine. This property must not be specified if the imageReference specifies a Linux OS image.

Returns:

the windowsConfiguration value.

withContainerConfiguration

public VirtualMachineConfiguration withContainerConfiguration(ContainerConfiguration containerConfiguration)

Set the containerConfiguration property: The container configuration for the pool. 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.

withDataDisks

public VirtualMachineConfiguration withDataDisks(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.

Parameters:

dataDisks - the dataDisks value to set.

Returns:

the VirtualMachineConfiguration object itself.

withDiskEncryptionConfiguration

public VirtualMachineConfiguration withDiskEncryptionConfiguration(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.

withExtensions

public VirtualMachineConfiguration withExtensions(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:

extensions - the extensions value to set.

Returns:

the VirtualMachineConfiguration object itself.

withImageReference

public VirtualMachineConfiguration withImageReference(ImageReference imageReference)

Set the imageReference property: A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. 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.

withLicenseType

public VirtualMachineConfiguration withLicenseType(String licenseType)

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.

withNodeAgentSkuId

public VirtualMachineConfiguration withNodeAgentSkuId(String nodeAgentSkuId)

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.

withNodePlacementConfiguration

public VirtualMachineConfiguration withNodePlacementConfiguration(NodePlacementConfiguration 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.

withOsDisk

public VirtualMachineConfiguration withOsDisk(OSDisk osDisk)

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.

withSecurityProfile

public VirtualMachineConfiguration withSecurityProfile(SecurityProfile securityProfile)

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.

withServiceArtifactReference

public VirtualMachineConfiguration withServiceArtifactReference(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.

withWindowsConfiguration

public VirtualMachineConfiguration withWindowsConfiguration(WindowsConfiguration windowsConfiguration)

Set the windowsConfiguration property: Windows operating system settings on 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.

Applies to