TextAnalysisClient.AnalyzeTextOperationStatus 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.
Overloads
AnalyzeTextOperationStatus(Guid, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, RequestContext) |
[Protocol Method] Get analysis status and results
|
AnalyzeTextOperationStatus(Guid, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, CancellationToken) |
Get analysis status and results. |
AnalyzeTextOperationStatus(Guid, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, RequestContext)
- Source:
- TextAnalysisClient.cs
[Protocol Method] Get analysis status and results
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler AnalyzeTextOperationStatus(Guid, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response AnalyzeTextOperationStatus (Guid jobId, bool? showStats, int? top, int? skip, Azure.RequestContext context);
abstract member AnalyzeTextOperationStatus : Guid * Nullable<bool> * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Response
override this.AnalyzeTextOperationStatus : Guid * Nullable<bool> * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Response
Public Overridable Function AnalyzeTextOperationStatus (jobId As Guid, showStats As Nullable(Of Boolean), top As Nullable(Of Integer), skip As Nullable(Of Integer), context As RequestContext) As Response
Parameters
- jobId
- Guid
job ID.
(Optional) if set to true, response will contain request and document level statistics.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
Service returned a non-success status code.
Examples
This sample shows how to call AnalyzeTextOperationStatus and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());
This sample shows how to call AnalyzeTextOperationStatus and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());
This sample shows how to call AnalyzeTextOperationStatus and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());
This sample shows how to call AnalyzeTextOperationStatus and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response response = client.AnalyzeTextOperationStatus(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());
This sample shows how to call AnalyzeTextOperationStatus and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());
Applies to
AnalyzeTextOperationStatus(Guid, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, CancellationToken)
- Source:
- TextAnalysisClient.cs
Get analysis status and results.
public virtual Azure.Response<Azure.AI.Language.Text.AnalyzeTextOperationState> AnalyzeTextOperationStatus (Guid jobId, bool? showStats = default, int? top = default, int? skip = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeTextOperationStatus : Guid * Nullable<bool> * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.Text.AnalyzeTextOperationState>
override this.AnalyzeTextOperationStatus : Guid * Nullable<bool> * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.Text.AnalyzeTextOperationState>
Public Overridable Function AnalyzeTextOperationStatus (jobId As Guid, Optional showStats As Nullable(Of Boolean) = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional skip As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeTextOperationState)
Parameters
- jobId
- Guid
job ID.
(Optional) if set to true, response will contain request and document level statistics.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call AnalyzeTextOperationStatus.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response<AnalyzeTextOperationState> response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"));
This sample shows how to call AnalyzeTextOperationStatus.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response<AnalyzeTextOperationState> response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"));
This sample shows how to call AnalyzeTextOperationStatus.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response<AnalyzeTextOperationState> response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"));
This sample shows how to call AnalyzeTextOperationStatus.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response<AnalyzeTextOperationState> response = client.AnalyzeTextOperationStatus(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"));
This sample shows how to call AnalyzeTextOperationStatus.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
TextAnalysisClient client = new TextAnalysisClient(endpoint, credential);
Response<AnalyzeTextOperationState> response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"));
Remarks
Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.