Freigeben über


LargePersonGroupClient.GetFace Method

Definition

Overloads

GetFace(Guid, Guid, RequestContext)

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

GetFace(Guid, Guid, CancellationToken)

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

GetFace(Guid, Guid, RequestContext)

Source:
LargePersonGroupClient.cs

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

public virtual Azure.Response GetFace (Guid personId, Guid persistedFaceId, Azure.RequestContext context);
abstract member GetFace : Guid * Guid * Azure.RequestContext -> Azure.Response
override this.GetFace : Guid * Guid * Azure.RequestContext -> Azure.Response
Public Overridable Function GetFace (personId As Guid, persistedFaceId As Guid, context As RequestContext) As Response

Parameters

personId
Guid

ID of the person.

persistedFaceId
Guid

Face ID of the face.

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

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");

Response response = client.GetFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"), null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("persistedFaceId").ToString());

Applies to

GetFace(Guid, Guid, CancellationToken)

Source:
LargePersonGroupClient.cs
public virtual Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPersonFace> GetFace (Guid personId, Guid persistedFaceId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFace : Guid * Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPersonFace>
override this.GetFace : Guid * Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPersonFace>
Public Overridable Function GetFace (personId As Guid, persistedFaceId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LargePersonGroupPersonFace)

Parameters

personId
Guid

ID of the person.

persistedFaceId
Guid

Face ID of the face.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetFace.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");

Response<LargePersonGroupPersonFace> response = client.GetFace(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), Guid.Parse("43897a75-8d6f-42cf-885e-74832febb055"));

Applies to