Package com.azure.compute.batch.models
Class BatchPoolUpdateContent
java.lang.Object
com.azure.compute.batch.models.BatchPoolUpdateContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchPoolUpdateContent>
public final class BatchPoolUpdateContent
extends Object
implements com.azure.json.JsonSerializable<BatchPoolUpdateContent>
Parameters for updating an Azure Batch Pool.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of BatchPoolUpdateContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchPoolUpdateContent
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchPoolUpdateContent from the JsonReader.Get the applicationPackageReferences property: A list of Packages to be installed on each Compute Node in the Pool.Get the certificateReferences property: If this element is present, it replaces any existing Certificate references configured on the Pool.Get the displayName property: The display name for the Pool.Get the metadata property: A list of name-value pairs associated with the Pool as metadata.Get the mountConfiguration property: Mount storage using specified file system for the entire lifetime of the pool.Get the networkConfiguration property: The network configuration for the Pool.Get the resourceTags property: The user-specified tags associated with the pool.Get the startTask property: A Task to run on each Compute Node as it joins the Pool.Get the targetNodeCommunicationMode property: The desired node communication mode for the pool.Get the taskSchedulingPolicy property: How Tasks are distributed across Compute Nodes in a Pool.Get the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single compute node in the pool.Get the upgradePolicy property: The upgrade policy for the Pool.Get the userAccounts property: The list of user Accounts to be created on each Compute Node in the Pool.Get the virtualMachineConfiguration property: The virtual machine configuration for the Pool.Get the vmSize property: The size of virtual machines in the Pool.Get the enableInterNodeCommunication property: Whether the Pool permits direct communication between Compute Nodes.setApplicationPackageReferences
(List<BatchApplicationPackageReference> applicationPackageReferences) Set the applicationPackageReferences property: A list of Packages to be installed on each Compute Node in the Pool.setCertificateReferences
(List<BatchCertificateReference> certificateReferences) Set the certificateReferences property: If this element is present, it replaces any existing Certificate references configured on the Pool.setDisplayName
(String displayName) Set the displayName property: The display name for the Pool.setEnableInterNodeCommunication
(Boolean enableInterNodeCommunication) Set the enableInterNodeCommunication property: Whether the Pool permits direct communication between Compute Nodes.setMetadata
(List<MetadataItem> metadata) Set the metadata property: A list of name-value pairs associated with the Pool as metadata.setMountConfiguration
(List<MountConfiguration> mountConfiguration) Set the mountConfiguration property: Mount storage using specified file system for the entire lifetime of the pool.setNetworkConfiguration
(NetworkConfiguration networkConfiguration) Set the networkConfiguration property: The network configuration for the Pool.setResourceTags
(Map<String, String> resourceTags) Set the resourceTags property: The user-specified tags associated with the pool.setStartTask
(BatchStartTask startTask) Set the startTask property: A Task to run on each Compute Node as it joins the Pool.setTargetNodeCommunicationMode
(BatchNodeCommunicationMode targetNodeCommunicationMode) Set the targetNodeCommunicationMode property: The desired node communication mode for the pool.setTaskSchedulingPolicy
(BatchTaskSchedulingPolicy taskSchedulingPolicy) Set the taskSchedulingPolicy property: How Tasks are distributed across Compute Nodes in a Pool.setTaskSlotsPerNode
(Integer taskSlotsPerNode) Set the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single compute node in the pool.setUpgradePolicy
(UpgradePolicy upgradePolicy) Set the upgradePolicy property: The upgrade policy for the Pool.setUserAccounts
(List<UserAccount> userAccounts) Set the userAccounts property: The list of user Accounts to be created on each Compute Node in the Pool.setVirtualMachineConfiguration
(VirtualMachineConfiguration virtualMachineConfiguration) Set the virtualMachineConfiguration property: The virtual machine configuration for the Pool.Set the vmSize property: The size of virtual machines in the Pool.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
-
BatchPoolUpdateContent
public BatchPoolUpdateContent()Creates an instance of BatchPoolUpdateContent class.
-
-
Method Details
-
getDisplayName
Get the displayName property: The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. This field can be updated only when the pool is empty.- Returns:
- the displayName value.
-
setDisplayName
Set the displayName property: The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. This field can be updated only when the pool is empty.- Parameters:
displayName
- the displayName value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getVmSize
Get the vmSize property: The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).<br /><br />This field can be updated only when the pool is empty.- Returns:
- the vmSize value.
-
setVmSize
Set the vmSize property: The size of virtual machines in the Pool. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://learn.microsoft.com/azure/batch/batch-pool-vm-sizes).<br /><br />This field can be updated only when the pool is empty.- Parameters:
vmSize
- the vmSize value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
isEnableInterNodeCommunication
Get the enableInterNodeCommunication property: Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the enableInterNodeCommunication value.
-
setEnableInterNodeCommunication
Set the enableInterNodeCommunication property: Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false.<br /><br />This field can be updated only when the pool is empty.- Parameters:
enableInterNodeCommunication
- the enableInterNodeCommunication value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getStartTask
Get the startTask property: A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged.- Returns:
- the startTask value.
-
setStartTask
Set the startTask property: A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged.- Parameters:
startTask
- the startTask value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getCertificateReferences
Get the certificateReferences property: If this element is present, it replaces any existing Certificate references configured on the Pool. If omitted, any existing Certificate references are left unchanged. For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.- Returns:
- the certificateReferences value.
-
setCertificateReferences
public BatchPoolUpdateContent setCertificateReferences(List<BatchCertificateReference> certificateReferences) Set the certificateReferences property: If this element is present, it replaces any existing Certificate references configured on the Pool. If omitted, any existing Certificate references are left unchanged. For Windows Nodes, the Batch service installs the Certificates to the specified Certificate store and location. For Linux Compute Nodes, the Certificates are stored in a directory inside the Task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. For Certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and Certificates are placed in that directory. Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.- Parameters:
certificateReferences
- the certificateReferences value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getApplicationPackageReferences
Get the applicationPackageReferences property: A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged.- Returns:
- the applicationPackageReferences value.
-
setApplicationPackageReferences
public BatchPoolUpdateContent setApplicationPackageReferences(List<BatchApplicationPackageReference> applicationPackageReferences) Set the applicationPackageReferences property: A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged.- Parameters:
applicationPackageReferences
- the applicationPackageReferences value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getMetadata
Get the metadata property: A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged.- Returns:
- the metadata value.
-
setMetadata
Set the metadata property: A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged.- Parameters:
metadata
- the metadata value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getVirtualMachineConfiguration
Get the virtualMachineConfiguration property: The virtual machine configuration for the Pool. This property must be specified.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the virtualMachineConfiguration value.
-
setVirtualMachineConfiguration
public BatchPoolUpdateContent setVirtualMachineConfiguration(VirtualMachineConfiguration virtualMachineConfiguration) Set the virtualMachineConfiguration property: The virtual machine configuration for the Pool. This property must be specified.<br /><br />This field can be updated only when the pool is empty.- Parameters:
virtualMachineConfiguration
- the virtualMachineConfiguration value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getTargetNodeCommunicationMode
Get the targetNodeCommunicationMode property: The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged.- Returns:
- the targetNodeCommunicationMode value.
-
setTargetNodeCommunicationMode
public BatchPoolUpdateContent setTargetNodeCommunicationMode(BatchNodeCommunicationMode targetNodeCommunicationMode) Set the targetNodeCommunicationMode property: The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged.- Parameters:
targetNodeCommunicationMode
- the targetNodeCommunicationMode value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getTaskSlotsPerNode
Get the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the taskSlotsPerNode value.
-
setTaskSlotsPerNode
Set the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.<br /><br />This field can be updated only when the pool is empty.- Parameters:
taskSlotsPerNode
- the taskSlotsPerNode value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getTaskSchedulingPolicy
Get the taskSchedulingPolicy property: How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the taskSchedulingPolicy value.
-
setTaskSchedulingPolicy
public BatchPoolUpdateContent setTaskSchedulingPolicy(BatchTaskSchedulingPolicy taskSchedulingPolicy) Set the taskSchedulingPolicy property: How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread.<br /><br />This field can be updated only when the pool is empty.- Parameters:
taskSchedulingPolicy
- the taskSchedulingPolicy value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getNetworkConfiguration
Get the networkConfiguration property: The network configuration for the Pool. This field can be updated only when the pool is empty.- Returns:
- the networkConfiguration value.
-
setNetworkConfiguration
Set the networkConfiguration property: The network configuration for the Pool. This field can be updated only when the pool is empty.- Parameters:
networkConfiguration
- the networkConfiguration value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getResourceTags
Get the resourceTags property: The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the resourceTags value.
-
setResourceTags
Set the resourceTags property: The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'.<br /><br />This field can be updated only when the pool is empty.- Parameters:
resourceTags
- the resourceTags value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getUserAccounts
Get the userAccounts property: The list of user Accounts to be created on each Compute Node in the Pool. This field can be updated only when the pool is empty.- Returns:
- the userAccounts value.
-
setUserAccounts
Set the userAccounts property: The list of user Accounts to be created on each Compute Node in the Pool. This field can be updated only when the pool is empty.- Parameters:
userAccounts
- the userAccounts value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getMountConfiguration
Get the mountConfiguration property: Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the mountConfiguration value.
-
setMountConfiguration
Set the mountConfiguration property: Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system.<br /><br />This field can be updated only when the pool is empty.- Parameters:
mountConfiguration
- the mountConfiguration value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
getUpgradePolicy
Get the upgradePolicy property: The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.<br /><br />This field can be updated only when the pool is empty.- Returns:
- the upgradePolicy value.
-
setUpgradePolicy
Set the upgradePolicy property: The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling.<br /><br />This field can be updated only when the pool is empty.- Parameters:
upgradePolicy
- the upgradePolicy value to set.- Returns:
- the BatchPoolUpdateContent object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BatchPoolUpdateContent>
- Throws:
IOException
-
fromJson
public static BatchPoolUpdateContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of BatchPoolUpdateContent from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of BatchPoolUpdateContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the BatchPoolUpdateContent.
-