CloudJob Class

  • java.lang.Object
    • com.microsoft.azure.batch.protocol.models.CloudJob

public class CloudJob

An Azure Batch job.

Method Summary

Modifier and Type Method and Description
List<EnvironmentSetting> commonEnvironmentSettings()

Get individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

JobConstraints constraints()

Get the constraints value.

DateTime creationTime()

Get the creationTime value.

String displayName()

Get the displayName value.

String eTag()

Get this is an opaque string. You can use it to detect whether the job has changed between requests. In particular, you can be pass the ETag when updating a job to specify that your changes should take effect only if nobody else has modified the job in the meantime.

JobExecutionInformation executionInfo()

Get the executionInfo value.

String id()

Get the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

JobManagerTask jobManagerTask()

Get the jobManagerTask value.

JobPreparationTask jobPreparationTask()

Get the Job Preparation task is a special task run on each node before any other task of the job.

JobReleaseTask jobReleaseTask()

Get the Job Release task is a special task run at the end of the job on each node that has run any other task of the job.

DateTime lastModified()

Get this is the last time at which the job level data, such as the job state or priority, changed. It does not factor in task-level changes such as adding new tasks or tasks changing state.

List<MetadataItem> metadata()

Get the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

OnAllTasksComplete onAllTasksComplete()

Get the default is noaction. Possible values include: 'noAction', 'terminateJob'.

OnTaskFailure onTaskFailure()

Get a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

PoolInformation poolInfo()

Get the poolInfo value.

JobState previousState()

Get this property is not set if the job is in its initial Active state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

DateTime previousStateTransitionTime()

Get this property is not set if the job is in its initial Active state.

Integer priority()

Get priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

JobState state()

Get possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

DateTime stateTransitionTime()

Get the stateTransitionTime value.

JobStatistics stats()

Get the stats value.

String url()

Get the url value.

Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

CloudJob withCommonEnvironmentSettings(List<EnvironmentSetting> commonEnvironmentSettings)

Set individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

CloudJob withConstraints(JobConstraints constraints)

Set the constraints value.

CloudJob withCreationTime(DateTime creationTime)

Set the creationTime value.

CloudJob withDisplayName(String displayName)

Set the displayName value.

CloudJob withETag(String eTag)

Set this is an opaque string. You can use it to detect whether the job has changed between requests. In particular, you can be pass the ETag when updating a job to specify that your changes should take effect only if nobody else has modified the job in the meantime.

CloudJob withExecutionInfo(JobExecutionInformation executionInfo)

Set the executionInfo value.

CloudJob withId(String id)

Set the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

CloudJob withJobManagerTask(JobManagerTask jobManagerTask)

Set the jobManagerTask value.

CloudJob withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set the Job Preparation task is a special task run on each node before any other task of the job.

CloudJob withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set the Job Release task is a special task run at the end of the job on each node that has run any other task of the job.

CloudJob withLastModified(DateTime lastModified)

Set this is the last time at which the job level data, such as the job state or priority, changed. It does not factor in task-level changes such as adding new tasks or tasks changing state.

CloudJob withMetadata(List<MetadataItem> metadata)

Set the Batch service does not assign any meaning to metadata; it is solely for the use of user code.

CloudJob withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

CloudJob withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set the default is noaction. Possible values include: 'noAction', 'terminateJob'.

CloudJob withOnTaskFailure(OnTaskFailure onTaskFailure)

Set a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

CloudJob withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

CloudJob withPreviousState(JobState previousState)

Set this property is not set if the job is in its initial Active state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

CloudJob withPreviousStateTransitionTime(DateTime previousStateTransitionTime)

Set this property is not set if the job is in its initial Active state.

CloudJob withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

CloudJob withState(JobState state)

Set possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

CloudJob withStateTransitionTime(DateTime stateTransitionTime)

Set the stateTransitionTime value.

CloudJob withStats(JobStatistics stats)

Set the stats value.

CloudJob withUrl(String url)

Set the url value.

CloudJob withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Method Details

commonEnvironmentSettings

public List commonEnvironmentSettings()

Get individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

Returns:

the commonEnvironmentSettings value

constraints

public JobConstraints constraints()

Get the constraints value.

Returns:

the constraints value

creationTime

public DateTime creationTime()

Get the creationTime value.

Returns:

the creationTime value

displayName

public String displayName()

Get the displayName value.

Returns:

the displayName value

eTag

public String eTag()

Get this is an opaque string. You can use it to detect whether the job has changed between requests. In particular, you can be pass the ETag when updating a job to specify that your changes should take effect only if nobody else has modified the job in the meantime.

Returns:

the eTag value

executionInfo

public JobExecutionInformation executionInfo()

Get the executionInfo value.

Returns:

the executionInfo value

id

public String id()

Get the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

Returns:

the id value

jobManagerTask

public JobManagerTask jobManagerTask()

Get the jobManagerTask value.

Returns:

the jobManagerTask value

jobPreparationTask

public JobPreparationTask jobPreparationTask()

Get the Job Preparation task is a special task run on each node before any other task of the job.

Returns:

the jobPreparationTask value

jobReleaseTask

public JobReleaseTask jobReleaseTask()

Get the Job Release task is a special task run at the end of the job on each node that has run any other task of the job.

Returns:

the jobReleaseTask value

lastModified

public DateTime lastModified()

Get this is the last time at which the job level data, such as the job state or priority, changed. It does not factor in task-level changes such as adding new tasks or tasks changing state.

Returns:

the lastModified value

metadata

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

networkConfiguration

public JobNetworkConfiguration networkConfiguration()

Get the networkConfiguration value.

Returns:

the networkConfiguration value

onAllTasksComplete

public OnAllTasksComplete onAllTasksComplete()

Get the default is noaction. Possible values include: 'noAction', 'terminateJob'.

Returns:

the onAllTasksComplete value

onTaskFailure

public OnTaskFailure onTaskFailure()

Get a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Returns:

the onTaskFailure value

poolInfo

public PoolInformation poolInfo()

Get the poolInfo value.

Returns:

the poolInfo value

previousState

public JobState previousState()

Get this property is not set if the job is in its initial Active state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Returns:

the previousState value

previousStateTransitionTime

public DateTime previousStateTransitionTime()

Get this property is not set if the job is in its initial Active state.

Returns:

the previousStateTransitionTime value

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. The default value is 0.

Returns:

the priority value

state

public JobState state()

Get possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Returns:

the state value

stateTransitionTime

public DateTime stateTransitionTime()

Get the stateTransitionTime value.

Returns:

the stateTransitionTime value

stats

public JobStatistics stats()

Get the stats value.

Returns:

the stats value

url

public String url()

Get the url value.

Returns:

the url value

usesTaskDependencies

public Boolean usesTaskDependencies()

Get the usesTaskDependencies value.

Returns:

the usesTaskDependencies value

withCommonEnvironmentSettings

public CloudJob withCommonEnvironmentSettings(List commonEnvironmentSettings)

Set individual tasks can override an environment setting specified here by specifying the same setting name with a different value.

Parameters:

commonEnvironmentSettings - the commonEnvironmentSettings value to set

Returns:

the CloudJob object itself.

withConstraints

public CloudJob withConstraints(JobConstraints constraints)

Set the constraints value.

Parameters:

constraints - the constraints value to set

Returns:

the CloudJob object itself.

withCreationTime

public CloudJob withCreationTime(DateTime creationTime)

Set the creationTime value.

Parameters:

creationTime - the creationTime value to set

Returns:

the CloudJob object itself.

withDisplayName

public CloudJob withDisplayName(String displayName)

Set the displayName value.

Parameters:

displayName - the displayName value to set

Returns:

the CloudJob object itself.

withETag

public CloudJob withETag(String eTag)

Set this is an opaque string. You can use it to detect whether the job has changed between requests. In particular, you can be pass the ETag when updating a job to specify that your changes should take effect only if nobody else has modified the job in the meantime.

Parameters:

eTag - the eTag value to set

Returns:

the CloudJob object itself.

withExecutionInfo

public CloudJob withExecutionInfo(JobExecutionInformation executionInfo)

Set the executionInfo value.

Parameters:

executionInfo - the executionInfo value to set

Returns:

the CloudJob object itself.

withId

public CloudJob withId(String id)

Set the ID is case-preserving and case-insensitive (that is, you may not have two IDs within an account that differ only by case).

Parameters:

id - the id value to set

Returns:

the CloudJob object itself.

withJobManagerTask

public CloudJob withJobManagerTask(JobManagerTask jobManagerTask)

Set the jobManagerTask value.

Parameters:

jobManagerTask - the jobManagerTask value to set

Returns:

the CloudJob object itself.

withJobPreparationTask

public CloudJob withJobPreparationTask(JobPreparationTask jobPreparationTask)

Set the Job Preparation task is a special task run on each node before any other task of the job.

Parameters:

jobPreparationTask - the jobPreparationTask value to set

Returns:

the CloudJob object itself.

withJobReleaseTask

public CloudJob withJobReleaseTask(JobReleaseTask jobReleaseTask)

Set the Job Release task is a special task run at the end of the job on each node that has run any other task of the job.

Parameters:

jobReleaseTask - the jobReleaseTask value to set

Returns:

the CloudJob object itself.

withLastModified

public CloudJob withLastModified(DateTime lastModified)

Set this is the last time at which the job level data, such as the job state or priority, changed. It does not factor in task-level changes such as adding new tasks or tasks changing state.

Parameters:

lastModified - the lastModified value to set

Returns:

the CloudJob object itself.

withMetadata

public CloudJob withMetadata(List 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 CloudJob object itself.

withNetworkConfiguration

public CloudJob withNetworkConfiguration(JobNetworkConfiguration networkConfiguration)

Set the networkConfiguration value.

Parameters:

networkConfiguration - the networkConfiguration value to set

Returns:

the CloudJob object itself.

withOnAllTasksComplete

public CloudJob withOnAllTasksComplete(OnAllTasksComplete onAllTasksComplete)

Set the default is noaction. Possible values include: 'noAction', 'terminateJob'.

Parameters:

onAllTasksComplete - the onAllTasksComplete value to set

Returns:

the CloudJob object itself.

withOnTaskFailure

public CloudJob withOnTaskFailure(OnTaskFailure onTaskFailure)

Set a task is considered to have failed if has a failureInfo. A failureInfo is set if the task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the task, for example due to a resource file download error. The default is noaction. Possible values include: 'noAction', 'performExitOptionsJobAction'.

Parameters:

onTaskFailure - the onTaskFailure value to set

Returns:

the CloudJob object itself.

withPoolInfo

public CloudJob withPoolInfo(PoolInformation poolInfo)

Set the poolInfo value.

Parameters:

poolInfo - the poolInfo value to set

Returns:

the CloudJob object itself.

withPreviousState

public CloudJob withPreviousState(JobState previousState)

Set this property is not set if the job is in its initial Active state. Possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Parameters:

previousState - the previousState value to set

Returns:

the CloudJob object itself.

withPreviousStateTransitionTime

public CloudJob withPreviousStateTransitionTime(DateTime previousStateTransitionTime)

Set this property is not set if the job is in its initial Active state.

Parameters:

previousStateTransitionTime - the previousStateTransitionTime value to set

Returns:

the CloudJob object itself.

withPriority

public CloudJob withPriority(Integer priority)

Set priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.

Parameters:

priority - the priority value to set

Returns:

the CloudJob object itself.

withState

public CloudJob withState(JobState state)

Set possible values include: 'active', 'disabling', 'disabled', 'enabling', 'terminating', 'completed', 'deleting'.

Parameters:

state - the state value to set

Returns:

the CloudJob object itself.

withStateTransitionTime

public CloudJob withStateTransitionTime(DateTime stateTransitionTime)

Set the stateTransitionTime value.

Parameters:

stateTransitionTime - the stateTransitionTime value to set

Returns:

the CloudJob object itself.

withStats

public CloudJob withStats(JobStatistics stats)

Set the stats value.

Parameters:

stats - the stats value to set

Returns:

the CloudJob object itself.

withUrl

public CloudJob withUrl(String url)

Set the url value.

Parameters:

url - the url value to set

Returns:

the CloudJob object itself.

withUsesTaskDependencies

public CloudJob withUsesTaskDependencies(Boolean usesTaskDependencies)

Set the usesTaskDependencies value.

Parameters:

usesTaskDependencies - the usesTaskDependencies value to set

Returns:

the CloudJob object itself.

Applies to