共用方式為


JobOperationsExtensions.GetTaskCountsAsync Method

Definition

Gets the Task counts for the specified Job.

public static System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.TaskCountsResult> GetTaskCountsAsync (this Microsoft.Azure.Batch.Protocol.IJobOperations operations, string jobId, Microsoft.Azure.Batch.Protocol.Models.JobGetTaskCountsOptions jobGetTaskCountsOptions = default, System.Threading.CancellationToken cancellationToken = default);
static member GetTaskCountsAsync : Microsoft.Azure.Batch.Protocol.IJobOperations * string * Microsoft.Azure.Batch.Protocol.Models.JobGetTaskCountsOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Batch.Protocol.Models.TaskCountsResult>
<Extension()>
Public Function GetTaskCountsAsync (operations As IJobOperations, jobId As String, Optional jobGetTaskCountsOptions As JobGetTaskCountsOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TaskCountsResult)

Parameters

operations
IJobOperations

The operations group for this extension method.

jobId
String

The ID of the Job.

jobGetTaskCountsOptions
JobGetTaskCountsOptions

Additional parameters for the operation

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

Task counts provide a count of the Tasks by active, running or completed Task state, and a count of Tasks which succeeded or failed. Tasks in the preparing state are counted as running. Note that the numbers returned may not always be up to date. If you need exact task counts, use a list query.

Applies to