Partilhar via


BatchJob Class

Definition

An Azure Batch Job.

public class BatchJob : System.ClientModel.Primitives.IJsonModel<Azure.Compute.Batch.BatchJob>, System.ClientModel.Primitives.IPersistableModel<Azure.Compute.Batch.BatchJob>
type BatchJob = class
    interface IJsonModel<BatchJob>
    interface IPersistableModel<BatchJob>
Public Class BatchJob
Implements IJsonModel(Of BatchJob), IPersistableModel(Of BatchJob)
Inheritance
BatchJob
Implements

Constructors

BatchJob(BatchPoolInfo)

Initializes a new instance of BatchJob.

Properties

AllowTaskPreemption

Whether Tasks in this job can be preempted by other high priority jobs. 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.

CommonEnvironmentSettings

The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value.

Constraints

The execution constraints for the Job.

CreationTime

The creation time of the Job.

DisplayName

The display name for the Job.

ETag

The ETag of the Job. 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.

ExecutionInfo

The execution information for the Job.

Id

A string that uniquely identifies the Job within the Account. 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

Details of a Job Manager Task to be launched when the Job is started.

JobPreparationTask

The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job.

JobReleaseTask

The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job.

LastModified

The last modified time of the Job. 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.

MaxParallelTasks

The maximum number of tasks that can be executed in parallel for the job. 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.

Metadata

A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

NetworkConfiguration

The network configuration for the Job.

OnAllTasksComplete

The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction.

OnTaskFailure

The action the Batch service should take when any Task in the Job fails. 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.

PoolInfo

The Pool settings associated with the Job.

PreviousState

The previous state of the Job. This property is not set if the Job is in its initial Active state.

PreviousStateTransitionTime

The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state.

Priority

The priority of the Job. 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.

State

The current state of the Job.

StateTransitionTime

The time at which the Job entered its current state.

Stats

Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes.

Url

The URL of the Job.

UsesTaskDependencies

Whether Tasks in the Job can define dependencies on each other. The default is false.

Explicit Interface Implementations

IJsonModel<BatchJob>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<BatchJob>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<BatchJob>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<BatchJob>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<BatchJob>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to