Class JobUpdateParameter


  • public class JobUpdateParameter
    extends Object
    The set of changes to be made to a Job.
    • Constructor Detail

      • JobUpdateParameter

        public JobUpdateParameter()
    • Method Detail

      • priority

        public Integer priority()
        Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, it is set to the default value 0.
        Returns:
        the priority value
      • withPriority

        public JobUpdateParameter withPriority​(Integer priority)
        Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, it is set to the default value 0.
        Parameters:
        priority - the priority value to set
        Returns:
        the JobUpdateParameter object itself.
      • maxParallelTasks

        public Integer maxParallelTasks()
        Get the value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
        Returns:
        the maxParallelTasks value
      • withMaxParallelTasks

        public JobUpdateParameter withMaxParallelTasks​(Integer maxParallelTasks)
        Set the value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API.
        Parameters:
        maxParallelTasks - the maxParallelTasks value to set
        Returns:
        the JobUpdateParameter object itself.
      • allowTaskPreemption

        public Boolean allowTaskPreemption()
        Get if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
        Returns:
        the allowTaskPreemption value
      • withAllowTaskPreemption

        public JobUpdateParameter withAllowTaskPreemption​(Boolean allowTaskPreemption)
        Set if the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API.
        Parameters:
        allowTaskPreemption - the allowTaskPreemption value to set
        Returns:
        the JobUpdateParameter object itself.
      • constraints

        public JobConstraints constraints()
        Get if omitted, the constraints are cleared.
        Returns:
        the constraints value
      • withConstraints

        public JobUpdateParameter withConstraints​(JobConstraints constraints)
        Set if omitted, the constraints are cleared.
        Parameters:
        constraints - the constraints value to set
        Returns:
        the JobUpdateParameter object itself.
      • poolInfo

        public PoolInformation poolInfo()
        Get you may change the Pool for a Job only when the Job is disabled. The Update Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal).
        Returns:
        the poolInfo value
      • withPoolInfo

        public JobUpdateParameter withPoolInfo​(PoolInformation poolInfo)
        Set you may change the Pool for a Job only when the Job is disabled. The Update Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal).
        Parameters:
        poolInfo - the poolInfo value to set
        Returns:
        the JobUpdateParameter object itself.
      • metadata

        public List<MetadataItem> metadata()
        Get if omitted, it takes the default value of an empty list; in effect, any existing metadata is deleted.
        Returns:
        the metadata value
      • withMetadata

        public JobUpdateParameter withMetadata​(List<MetadataItem> metadata)
        Set if omitted, it takes the default value of an empty list; in effect, any existing metadata is deleted.
        Parameters:
        metadata - the metadata value to set
        Returns:
        the JobUpdateParameter object itself.
      • onAllTasksComplete

        public OnAllTasksComplete onAllTasksComplete()
        Get if omitted, the completion behavior is set to noaction. If the current value is terminatejob, this is an error because a Job's completion behavior may not be changed from terminatejob to noaction. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails and Batch returns status code 400 (Bad Request) and an 'invalid property value' error response. If you do not specify this element in a PUT request, it is equivalent to passing noaction. This is an error if the current value is terminatejob. Possible values include: 'noAction', 'terminateJob'.
        Returns:
        the onAllTasksComplete value
      • withOnAllTasksComplete

        public JobUpdateParameter withOnAllTasksComplete​(OnAllTasksComplete onAllTasksComplete)
        Set if omitted, the completion behavior is set to noaction. If the current value is terminatejob, this is an error because a Job's completion behavior may not be changed from terminatejob to noaction. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails and Batch returns status code 400 (Bad Request) and an 'invalid property value' error response. If you do not specify this element in a PUT request, it is equivalent to passing noaction. This is an error if the current value is terminatejob. Possible values include: 'noAction', 'terminateJob'.
        Parameters:
        onAllTasksComplete - the onAllTasksComplete value to set
        Returns:
        the JobUpdateParameter object itself.