ComputeBatchModelFactory.BatchJobCreateContent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of BatchJobCreateContent.
public static Azure.Compute.Batch.BatchJobCreateContent BatchJobCreateContent (string id = default, string displayName = default, bool? usesTaskDependencies = default, int? priority = default, bool? allowTaskPreemption = default, int? maxParallelTasks = default, Azure.Compute.Batch.BatchJobConstraints constraints = default, Azure.Compute.Batch.BatchJobManagerTask jobManagerTask = default, Azure.Compute.Batch.BatchJobPreparationTask jobPreparationTask = default, Azure.Compute.Batch.BatchJobReleaseTask jobReleaseTask = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.EnvironmentSetting> commonEnvironmentSettings = default, Azure.Compute.Batch.BatchPoolInfo poolInfo = default, Azure.Compute.Batch.OnAllBatchTasksComplete? onAllTasksComplete = default, Azure.Compute.Batch.OnBatchTaskFailure? onTaskFailure = default, Azure.Compute.Batch.BatchJobNetworkConfiguration networkConfiguration = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.MetadataItem> metadata = default);
static member BatchJobCreateContent : string * string * Nullable<bool> * Nullable<int> * Nullable<bool> * Nullable<int> * Azure.Compute.Batch.BatchJobConstraints * Azure.Compute.Batch.BatchJobManagerTask * Azure.Compute.Batch.BatchJobPreparationTask * Azure.Compute.Batch.BatchJobReleaseTask * seq<Azure.Compute.Batch.EnvironmentSetting> * Azure.Compute.Batch.BatchPoolInfo * Nullable<Azure.Compute.Batch.OnAllBatchTasksComplete> * Nullable<Azure.Compute.Batch.OnBatchTaskFailure> * Azure.Compute.Batch.BatchJobNetworkConfiguration * seq<Azure.Compute.Batch.MetadataItem> -> Azure.Compute.Batch.BatchJobCreateContent
Public Shared Function BatchJobCreateContent (Optional id As String = Nothing, Optional displayName As String = Nothing, Optional usesTaskDependencies As Nullable(Of Boolean) = Nothing, Optional priority As Nullable(Of Integer) = Nothing, Optional allowTaskPreemption As Nullable(Of Boolean) = Nothing, Optional maxParallelTasks As Nullable(Of Integer) = Nothing, Optional constraints As BatchJobConstraints = Nothing, Optional jobManagerTask As BatchJobManagerTask = Nothing, Optional jobPreparationTask As BatchJobPreparationTask = Nothing, Optional jobReleaseTask As BatchJobReleaseTask = Nothing, Optional commonEnvironmentSettings As IEnumerable(Of EnvironmentSetting) = Nothing, Optional poolInfo As BatchPoolInfo = Nothing, Optional onAllTasksComplete As Nullable(Of OnAllBatchTasksComplete) = Nothing, Optional onTaskFailure As Nullable(Of OnBatchTaskFailure) = Nothing, Optional networkConfiguration As BatchJobNetworkConfiguration = Nothing, Optional metadata As IEnumerable(Of MetadataItem) = Nothing) As BatchJobCreateContent
Parameters
- id
- String
A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).
- displayName
- String
The display name for the Job. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.
Whether Tasks in the Job can define dependencies on each other. The default is false.
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.
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.
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.
- constraints
- BatchJobConstraints
The execution constraints for the Job.
- jobManagerTask
- BatchJobManagerTask
Details of a Job Manager Task to be launched when the Job is started. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for example by deciding what additional Tasks to run, determining when the work is complete, etc. (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged Task in the system and perform whatever actions are required for the Job.) For example, a Job Manager Task might download a file specified as a parameter, analyze the contents of that file and submit additional Tasks based on those contents.
- jobPreparationTask
- BatchJobPreparationTask
The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node.
- jobReleaseTask
- BatchJobReleaseTask
The Job Release Task. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation.
- commonEnvironmentSettings
- IEnumerable<EnvironmentSetting>
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.
- poolInfo
- BatchPoolInfo
The Pool on which the Batch service runs the Job's Tasks.
- onAllTasksComplete
- Nullable<OnAllBatchTasksComplete>
The action the Batch service should take when all Tasks in the Job are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction.
- onTaskFailure
- Nullable<OnBatchTaskFailure>
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.
- networkConfiguration
- BatchJobNetworkConfiguration
The network configuration for the Job.
- metadata
- IEnumerable<MetadataItem>
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.
Returns
A new BatchJobCreateContent instance for mocking.
Applies to
Azure SDK for .NET