Partilhar via


ComputeBatchModelFactory.BatchSubtask Method

Definition

Initializes a new instance of BatchSubtask.

public static Azure.Compute.Batch.BatchSubtask BatchSubtask (int? id = default, Azure.Compute.Batch.BatchNodeInfo nodeInfo = default, DateTimeOffset? startTime = default, DateTimeOffset? endTime = default, int? exitCode = default, Azure.Compute.Batch.BatchTaskContainerExecutionInfo containerInfo = default, Azure.Compute.Batch.BatchTaskFailureInfo failureInfo = default, Azure.Compute.Batch.BatchSubtaskState? state = default, DateTimeOffset? stateTransitionTime = default, Azure.Compute.Batch.BatchSubtaskState? previousState = default, DateTimeOffset? previousStateTransitionTime = default, Azure.Compute.Batch.BatchTaskExecutionResult? result = default);
static member BatchSubtask : Nullable<int> * Azure.Compute.Batch.BatchNodeInfo * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<int> * Azure.Compute.Batch.BatchTaskContainerExecutionInfo * Azure.Compute.Batch.BatchTaskFailureInfo * Nullable<Azure.Compute.Batch.BatchSubtaskState> * Nullable<DateTimeOffset> * Nullable<Azure.Compute.Batch.BatchSubtaskState> * Nullable<DateTimeOffset> * Nullable<Azure.Compute.Batch.BatchTaskExecutionResult> -> Azure.Compute.Batch.BatchSubtask
Public Shared Function BatchSubtask (Optional id As Nullable(Of Integer) = Nothing, Optional nodeInfo As BatchNodeInfo = Nothing, Optional startTime As Nullable(Of DateTimeOffset) = Nothing, Optional endTime As Nullable(Of DateTimeOffset) = Nothing, Optional exitCode As Nullable(Of Integer) = Nothing, Optional containerInfo As BatchTaskContainerExecutionInfo = Nothing, Optional failureInfo As BatchTaskFailureInfo = Nothing, Optional state As Nullable(Of BatchSubtaskState) = Nothing, Optional stateTransitionTime As Nullable(Of DateTimeOffset) = Nothing, Optional previousState As Nullable(Of BatchSubtaskState) = Nothing, Optional previousStateTransitionTime As Nullable(Of DateTimeOffset) = Nothing, Optional result As Nullable(Of BatchTaskExecutionResult) = Nothing) As BatchSubtask

Parameters

id
Nullable<Int32>

The ID of the subtask.

nodeInfo
BatchNodeInfo

Information about the Compute Node on which the subtask ran.

startTime
Nullable<DateTimeOffset>

The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running.

endTime
Nullable<DateTimeOffset>

The time at which the subtask completed. This property is set only if the subtask is in the Completed state.

exitCode
Nullable<Int32>

The exit code of the program specified on the subtask command line. This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code.

containerInfo
BatchTaskContainerExecutionInfo

Information about the container under which the Task is executing. This property is set only if the Task runs in a container context.

failureInfo
BatchTaskFailureInfo

Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure.

state
Nullable<BatchSubtaskState>

The current state of the subtask.

stateTransitionTime
Nullable<DateTimeOffset>

The time at which the subtask entered its current state.

previousState
Nullable<BatchSubtaskState>

The previous state of the subtask. This property is not set if the subtask is in its initial running state.

previousStateTransitionTime
Nullable<DateTimeOffset>

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

result
Nullable<BatchTaskExecutionResult>

The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property.

Returns

A new BatchSubtask instance for mocking.

Applies to