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 Details

    • BatchPoolUpdateContent

      public BatchPoolUpdateContent()
      Creates an instance of BatchPoolUpdateContent class.
  • Method Details

    • getDisplayName

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

      public BatchPoolUpdateContent setDisplayName(String displayName)
      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

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

      public BatchPoolUpdateContent setVmSize(String vmSize)
      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

      public Boolean 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

      public BatchPoolUpdateContent setEnableInterNodeCommunication(Boolean enableInterNodeCommunication)
      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

      public BatchStartTask 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

      public BatchPoolUpdateContent setStartTask(BatchStartTask startTask)
      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

      public List<BatchCertificateReference> 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

      public List<BatchApplicationPackageReference> 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

      public List<MetadataItem> 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

      public BatchPoolUpdateContent setMetadata(List<MetadataItem> metadata)
      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

      public VirtualMachineConfiguration 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

      public BatchNodeCommunicationMode 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

      public Integer 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

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

      public BatchTaskSchedulingPolicy 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

      public NetworkConfiguration 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

      public BatchPoolUpdateContent setNetworkConfiguration(NetworkConfiguration networkConfiguration)
      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

      public Map<String,String> 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

      public BatchPoolUpdateContent setResourceTags(Map<String,String> resourceTags)
      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

      public List<UserAccount> 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

      public BatchPoolUpdateContent setUserAccounts(List<UserAccount> userAccounts)
      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

      public List<MountConfiguration> 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

      public BatchPoolUpdateContent setMountConfiguration(List<MountConfiguration> mountConfiguration)
      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

      public UpgradePolicy 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

      public BatchPoolUpdateContent setUpgradePolicy(UpgradePolicy upgradePolicy)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.