Class PoolSpecification


  • public class PoolSpecification
    extends Object
    Specification for creating a new Pool.
    • Constructor Detail

      • PoolSpecification

        public PoolSpecification()
    • Method Detail

      • displayName

        public String displayName()
        Get the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
        Returns:
        the displayName value
      • withDisplayName

        public PoolSpecification withDisplayName​(String displayName)
        Set the display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
        Parameters:
        displayName - the displayName value to set
        Returns:
        the PoolSpecification object itself.
      • vmSize

        public String vmSize()
        Get for information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).
        Returns:
        the vmSize value
      • withVmSize

        public PoolSpecification withVmSize​(String vmSize)
        Set for information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes).
        Parameters:
        vmSize - the vmSize value to set
        Returns:
        the PoolSpecification object itself.
      • cloudServiceConfiguration

        public CloudServiceConfiguration cloudServiceConfiguration()
        Get this property must be specified if the Pool needs to be created with Azure PaaS VMs. This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). This property cannot be specified if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'.
        Returns:
        the cloudServiceConfiguration value
      • withCloudServiceConfiguration

        public PoolSpecification withCloudServiceConfiguration​(CloudServiceConfiguration cloudServiceConfiguration)
        Set this property must be specified if the Pool needs to be created with Azure PaaS VMs. This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). This property cannot be specified if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'.
        Parameters:
        cloudServiceConfiguration - the cloudServiceConfiguration value to set
        Returns:
        the PoolSpecification object itself.
      • virtualMachineConfiguration

        public VirtualMachineConfiguration virtualMachineConfiguration()
        Get this property must be specified if the Pool needs to be created with Azure IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
        Returns:
        the virtualMachineConfiguration value
      • withVirtualMachineConfiguration

        public PoolSpecification withVirtualMachineConfiguration​(VirtualMachineConfiguration virtualMachineConfiguration)
        Set this property must be specified if the Pool needs to be created with Azure IaaS VMs. This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. If neither is specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
        Parameters:
        virtualMachineConfiguration - the virtualMachineConfiguration value to set
        Returns:
        the PoolSpecification object itself.
      • maxTasksPerNode

        public Integer maxTasksPerNode()
        Get 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.
        Returns:
        the maxTasksPerNode value
      • withMaxTasksPerNode

        public PoolSpecification withMaxTasksPerNode​(Integer maxTasksPerNode)
        Set 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.
        Parameters:
        maxTasksPerNode - the maxTasksPerNode value to set
        Returns:
        the PoolSpecification object itself.
      • taskSchedulingPolicy

        public TaskSchedulingPolicy taskSchedulingPolicy()
        Get if not specified, the default is spread.
        Returns:
        the taskSchedulingPolicy value
      • withTaskSchedulingPolicy

        public PoolSpecification withTaskSchedulingPolicy​(TaskSchedulingPolicy taskSchedulingPolicy)
        Set if not specified, the default is spread.
        Parameters:
        taskSchedulingPolicy - the taskSchedulingPolicy value to set
        Returns:
        the PoolSpecification object itself.
      • resizeTimeout

        public org.joda.time.Period resizeTimeout()
        Get this timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
        Returns:
        the resizeTimeout value
      • withResizeTimeout

        public PoolSpecification withResizeTimeout​(org.joda.time.Period resizeTimeout)
        Set this timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
        Parameters:
        resizeTimeout - the resizeTimeout value to set
        Returns:
        the PoolSpecification object itself.
      • targetDedicatedNodes

        public Integer targetDedicatedNodes()
        Get this property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
        Returns:
        the targetDedicatedNodes value
      • withTargetDedicatedNodes

        public PoolSpecification withTargetDedicatedNodes​(Integer targetDedicatedNodes)
        Set this property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
        Parameters:
        targetDedicatedNodes - the targetDedicatedNodes value to set
        Returns:
        the PoolSpecification object itself.
      • targetLowPriorityNodes

        public Integer targetLowPriorityNodes()
        Get this property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
        Returns:
        the targetLowPriorityNodes value
      • withTargetLowPriorityNodes

        public PoolSpecification withTargetLowPriorityNodes​(Integer targetLowPriorityNodes)
        Set this property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both.
        Parameters:
        targetLowPriorityNodes - the targetLowPriorityNodes value to set
        Returns:
        the PoolSpecification object itself.
      • enableAutoScale

        public Boolean enableAutoScale()
        Get if false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false.
        Returns:
        the enableAutoScale value
      • withEnableAutoScale

        public PoolSpecification withEnableAutoScale​(Boolean enableAutoScale)
        Set if false, at least one of targetDedicateNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false.
        Parameters:
        enableAutoScale - the enableAutoScale value to set
        Returns:
        the PoolSpecification object itself.
      • autoScaleFormula

        public String autoScaleFormula()
        Get this property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information.
        Returns:
        the autoScaleFormula value
      • withAutoScaleFormula

        public PoolSpecification withAutoScaleFormula​(String autoScaleFormula)
        Set this property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information.
        Parameters:
        autoScaleFormula - the autoScaleFormula value to set
        Returns:
        the PoolSpecification object itself.
      • autoScaleEvaluationInterval

        public org.joda.time.Period autoScaleEvaluationInterval()
        Get the default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
        Returns:
        the autoScaleEvaluationInterval value
      • withAutoScaleEvaluationInterval

        public PoolSpecification withAutoScaleEvaluationInterval​(org.joda.time.Period autoScaleEvaluationInterval)
        Set the default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).
        Parameters:
        autoScaleEvaluationInterval - the autoScaleEvaluationInterval value to set
        Returns:
        the PoolSpecification object itself.
      • enableInterNodeCommunication

        public Boolean enableInterNodeCommunication()
        Get 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.
        Returns:
        the enableInterNodeCommunication value
      • withEnableInterNodeCommunication

        public PoolSpecification withEnableInterNodeCommunication​(Boolean enableInterNodeCommunication)
        Set 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.
        Parameters:
        enableInterNodeCommunication - the enableInterNodeCommunication value to set
        Returns:
        the PoolSpecification object itself.
      • networkConfiguration

        public NetworkConfiguration networkConfiguration()
        Get the networkConfiguration value.
        Returns:
        the networkConfiguration value
      • withNetworkConfiguration

        public PoolSpecification withNetworkConfiguration​(NetworkConfiguration networkConfiguration)
        Set the networkConfiguration value.
        Parameters:
        networkConfiguration - the networkConfiguration value to set
        Returns:
        the PoolSpecification object itself.
      • startTask

        public StartTask startTask()
        Get the startTask value.
        Returns:
        the startTask value
      • withStartTask

        public PoolSpecification withStartTask​(StartTask startTask)
        Set the startTask value.
        Parameters:
        startTask - the startTask value to set
        Returns:
        the PoolSpecification object itself.
      • certificateReferences

        public List<CertificateReference> certificateReferences()
        Get 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.
        Returns:
        the certificateReferences value
      • withCertificateReferences

        public PoolSpecification withCertificateReferences​(List<CertificateReference> certificateReferences)
        Set 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.
        Parameters:
        certificateReferences - the certificateReferences value to set
        Returns:
        the PoolSpecification object itself.
      • applicationPackageReferences

        public List<ApplicationPackageReference> applicationPackageReferences()
        Get 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. There is a maximum of 10 Package references on any given Pool.
        Returns:
        the applicationPackageReferences value
      • withApplicationPackageReferences

        public PoolSpecification withApplicationPackageReferences​(List<ApplicationPackageReference> applicationPackageReferences)
        Set 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. There is a maximum of 10 Package references on any given Pool.
        Parameters:
        applicationPackageReferences - the applicationPackageReferences value to set
        Returns:
        the PoolSpecification object itself.
      • applicationLicenses

        public List<String> applicationLicenses()
        Get the list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, Pool creation will fail. The permitted licenses available on the Pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each application license added to the Pool.
        Returns:
        the applicationLicenses value
      • withApplicationLicenses

        public PoolSpecification withApplicationLicenses​(List<String> applicationLicenses)
        Set the list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, Pool creation will fail. The permitted licenses available on the Pool are 'maya', 'vray', '3dsmax', 'arnold'. An additional charge applies for each application license added to the Pool.
        Parameters:
        applicationLicenses - the applicationLicenses value to set
        Returns:
        the PoolSpecification object itself.
      • userAccounts

        public List<UserAccount> userAccounts()
        Get the userAccounts value.
        Returns:
        the userAccounts value
      • withUserAccounts

        public PoolSpecification withUserAccounts​(List<UserAccount> userAccounts)
        Set the userAccounts value.
        Parameters:
        userAccounts - the userAccounts value to set
        Returns:
        the PoolSpecification object itself.
      • metadata

        public List<MetadataItem> metadata()
        Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.
        Returns:
        the metadata value
      • withMetadata

        public PoolSpecification withMetadata​(List<MetadataItem> metadata)
        Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.
        Parameters:
        metadata - the metadata value to set
        Returns:
        the PoolSpecification object itself.
      • mountConfiguration

        public List<MountConfiguration> mountConfiguration()
        Get this supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
        Returns:
        the mountConfiguration value
      • withMountConfiguration

        public PoolSpecification withMountConfiguration​(List<MountConfiguration> mountConfiguration)
        Set this supports Azure Files, NFS, CIFS/SMB, and Blobfuse.
        Parameters:
        mountConfiguration - the mountConfiguration value to set
        Returns:
        the PoolSpecification object itself.