Dela via


LargeFaceListClient.GetTrainingStatusAsync Method

Definition

Overloads

GetTrainingStatusAsync(RequestContext)

[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details.

GetTrainingStatusAsync(CancellationToken)

Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details.

GetTrainingStatusAsync(RequestContext)

Source:
LargeFaceListClient.cs

[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-training-status for more details.

public virtual System.Threading.Tasks.Task<Azure.Response> GetTrainingStatusAsync (Azure.RequestContext context);
abstract member GetTrainingStatusAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTrainingStatusAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetTrainingStatusAsync (context As RequestContext) As Task(Of Response)

Parameters

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 GetTrainingStatusAsync and parse the result.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id");

Response response = await client.GetTrainingStatusAsync(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("lastActionDateTime").ToString());
Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString());

Applies to

GetTrainingStatusAsync(CancellationToken)

Source:
LargeFaceListClient.cs
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceTrainingResult>> GetTrainingStatusAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetTrainingStatusAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceTrainingResult>>
override this.GetTrainingStatusAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceTrainingResult>>
Public Overridable Function GetTrainingStatusAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FaceTrainingResult))

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetTrainingStatusAsync.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id");

Response<FaceTrainingResult> response = await client.GetTrainingStatusAsync();

Applies to